题目: Evaluate the value of an arithmetic expression
inReverse Polish Notation.Valid operators are+,-,*,/. Each operand may be an
integer or another e.....
分类:
其他好文 时间:
2014-05-16 05:56:07
阅读次数:
221
题目: Givennpoints on a 2D plane, find the maximum
number of points that lie on the same straight line.解题思路:
第一反应:枚举两个点组成的直线,然后看其他的点在不在这条直线上,在此过程中统计最大.....
分类:
其他好文 时间:
2014-05-16 05:54:57
阅读次数:
193
@RequestMapping的可选参数 value:表示需要匹配的url的格式。
method:表示所需处理请求的http 协议(如get,post,put,delete等),可选值为RequestMethod这个enum的值。
params:格式为”paramname=paramvalue” 或...
分类:
移动开发 时间:
2014-05-15 15:43:39
阅读次数:
405
本文介绍下,在javascript中实现表单序列化的方法,通过实例加深理解,有需要的朋友参考下吧。在JavaScript中,可以利用表单字段的type属性,连同name和value属性一起实现对表单的序列。首先,我们来了解下在表单提交期间,浏览器是怎样将数据发送给服务器的。对表单字段的名称和值进行U...
分类:
编程语言 时间:
2014-05-15 15:26:40
阅读次数:
318
Hashtable,哈希表是根据关键码值(Key value)直接进行访问的数据结构。它通过把关键码值映射到表中一个位置来访问记录,以加快查找的速度。
HashMap,不保证映射的顺序,特别是它不保证该顺序恒久不变。一个HashMap的实际容量=容量x因子,其默认值是16×0.75=12。当存入HashMap的对象超过这个容量时,HashMap会重新构造存取表(长度变为原来的2倍,然后一个个indexfor进去),这是一个大问题,所以当你知道大概要存放多少个对象时,最好设为该实际容量的能接受的数字。对于冲突...
分类:
其他好文 时间:
2014-05-15 06:59:55
阅读次数:
236
题目
Write an efficient algorithm that searches for a value in an m x n matrix. This matrix has the following properties:
Integers in each row are sorted from left to right.The first integer...
分类:
其他好文 时间:
2014-05-15 03:41:11
阅读次数:
257
【题目】
Given a string S, find the longest palindromic substring in S. You may assume that the maximum length of S is 1000, and there exists one unique longest palindromic substring.
【题意】
题意是找出字符串S中最长回文子串,S最长为1000,保证有唯一解
【思路】
原字符串用特殊字符#间隔,如下所示:
#a...
分类:
其他好文 时间:
2014-05-15 03:31:25
阅读次数:
299
CoinsTime Limit:3000MSMemory Limit:30000KTotal
Submissions:27580Accepted:9335DescriptionPeople in Silverland use coins.They
have coins of value A1,A2,...
分类:
其他好文 时间:
2014-05-14 11:52:46
阅读次数:
270
最近在看Jdk6中String的源码的时候发现String的有个这样的构造方法,源代码内容如下:public String(String original)
{ int size = original.count; char[] originalValue = original.value; cha...
分类:
其他好文 时间:
2014-05-14 11:34:24
阅读次数:
274
在系列(2)中我们展示了一个简单的get请求,并返回了一个简单的helloworld页面。本篇我们来学习如何来配置一个action的url映射规则。在系列(2)中我们在HelloWorldController上配置了一个@RequestMapping(value
= "/helloworld")这表...
分类:
编程语言 时间:
2014-05-14 11:09:46
阅读次数:
424