题目
Given a linked list and a value x, partition it such that all nodes less than x come before nodes greater than or equal to x.
You should preserve the original relative order of the node...
分类:
其他好文 时间:
2014-06-11 06:28:41
阅读次数:
364
Whatis it and why should I care?
X-Frame-Options(在草拟的标准中已经移除X-,只保留Frame-Options)是一个新技术用来指定网站页面是否允许嵌入IFrame页面。这样能够解决点击劫持(clickjacking)攻击。
此技术是基于每个页面的HTTP响应头特定参数实现的。支持(X-)Frame-Options头参数的浏览器根据标准会允许或禁...
分类:
编程语言 时间:
2014-06-11 06:20:49
阅读次数:
362
Merge two sorted linked lists and return it as
a new list. The new list should be made by splicing together the nodes of the
first two lists.水题不解释,一A,...
分类:
其他好文 时间:
2014-06-10 08:58:37
阅读次数:
191
本人使用的Tomcat版本为apache-tomcat-6.0.18(用的是解压包),解压路径为E:\apache-tomcat-6.0.18\apache-tomcat-6.0.18\,我如果部署在myEclipse里启动可以正常启动,当然也可以访问我的工程,但是如果我直接在tomcat源文件b....
分类:
编程语言 时间:
2014-06-10 08:32:35
阅读次数:
264
Given an array of integers, find two numbers such that they add up to a specific target number.
The function twoSum should return indices of the two numbers such that they add up to the target, whe...
分类:
其他好文 时间:
2014-06-09 23:14:45
阅读次数:
264
什么是单一职责原则 什么是单一职责原则? 单一职责原则的英文名称是Single
Responsibility Principle,简称SRP。SRP的原话解释是:There should never be more than one
reason for a class to change.也就是说...
分类:
其他好文 时间:
2014-06-08 19:36:12
阅读次数:
315
Given an array of words and a length L, format the text such that each line has exactly L characters and is fully (left and right) justified.
You should pack your words in a greedy approach; that i...
分类:
编程语言 时间:
2014-06-08 15:25:00
阅读次数:
282
题目:convert("PAYPALISHIRING", 3) should return "PAHNAPLSIIGYIR".
解题思路:这个是个纯粹找规律的题,其他没啥特殊的。下面的例子nRows=4;
找规律按照数组小标开始,寻找下标出现的规律,
1. 第一行和最后一行相邻元素下标之差为 2*nRows-2;
2. 除过第一行和最后一行,其余行要多一个元素,该元素出现的下标和行号有关,比如5 = 1 + 6 - 2,可以总结出规律为 j + 2*nRows-2 - 2*i;
关于 i 和 j 看以看下面...
分类:
其他好文 时间:
2014-06-08 09:11:57
阅读次数:
230
题目...For example,Given input array A = [1,1,2],Your function should return length = 2, and A is now [1,2].
解题思路,
移除数组中的重复元素,并返回新数组的长度。
这个题目应该算是简单的题目。使用两个变量就可以。具体的看代码
代码实现......
分类:
其他好文 时间:
2014-06-08 03:54:22
阅读次数:
279
Given an array of integers, find two numbers such that they add up to a specific target number.
The function twoSum should return indices of the two numbers such that they add up to the target, whe...
分类:
其他好文 时间:
2014-06-08 02:12:04
阅读次数:
216