1 public class Solution { 2 public int
lengthOfLongestSubstring(String s) { 3 int length = s.length(); 4 if (length ==
0) return ...
分类:
其他好文 时间:
2014-06-13 08:31:32
阅读次数:
214
Question: Mergeksorted linked lists and return
it as one sorted list. Analyze and describe its complexity.Solution: Find the
smallest list-head first....
分类:
其他好文 时间:
2014-06-10 19:51:30
阅读次数:
278
1 class Solution { 2 public: 3 int
singleNumber(int A[], int n) { 4 int bits = sizeof(int)*8; 5 int result=0; 6
for(int i...
分类:
移动开发 时间:
2014-06-10 19:45:48
阅读次数:
334
前中后遍历 递归版 1 /* Recursive solution */ 2 class
Solution { 3 public: 4 vector preorderTraversal(TreeNode *root) { 5 6 vector
resul...
分类:
其他好文 时间:
2014-06-10 19:38:03
阅读次数:
219
KK上全屏界面如何实现禁止状态栏下拉?[SOLUTION]Google从KK开始增加了状态栏透明以及全屏
界面有通知可以下拉状态栏的设计,而这个设计出现的隐患是设置了FULL_SCREEN的界面是无法禁止状态栏下拉的,这样对一些工程测试app可能会造
成一定的影响,但是以google默认的设计,应用...
分类:
其他好文 时间:
2014-06-10 17:06:52
阅读次数:
213
一次过 1 public class Solution { 2 public String
intToRoman(int num) { 3 StringBuffer res = new StringBuffer(); 4 if (num >
3999 || n...
分类:
其他好文 时间:
2014-06-10 16:12:12
阅读次数:
215
1 class Solution { 2 public: 3 int
singleNumber(int A[], int n) { 4 int i,j; 5 for(i=0; i<n; i++) 6 { 7 for(j...
分类:
移动开发 时间:
2014-06-10 11:41:55
阅读次数:
259
戳我去解题Write a function to find the longest
common prefix string amongst an array of strings.class Solution {public: string
longestCommonPrefix(vecto...
分类:
其他好文 时间:
2014-06-10 08:29:55
阅读次数:
189
The oldest solution that people still use for
this problem is select(). The select() call takes three sets of fds (implemented
as bit arrays): one for...
分类:
编程语言 时间:
2014-06-10 08:26:42
阅读次数:
325
题目链接题意:给出长度为n的数组,和整数elem, 要求删除数组中存在的elem,返回最终的数组长度。附上代码:
1 class Solution { 2 public: 3 int removeElement(int A[], int n, int elem) { 4
//...
分类:
其他好文 时间:
2014-06-09 13:38:05
阅读次数:
190