码迷,mamicode.com
首页 >  
搜索关键字:lintcode    ( 1584个结果
[LintCode] 最长单词
1 class Solution { 2 public: 3 /** 4 * @param dictionary: a vector of strings 5 * @return: a vector of strings 6 */ 7 vector l...
分类:其他好文   时间:2015-06-30 01:25:36    阅读次数:857
[LintCode] 空格替换
1 class Solution { 2 public: 3 /** 4 * @param string: An array of Char 5 * @param length: The true length of the string 6 * @retur...
分类:其他好文   时间:2015-06-30 01:17:38    阅读次数:130
[LintCode] 字符串查找
暴力解法(O(n^2)): 1 class Solution { 2 public: 3 /** 4 * Returns a index to the first occurrence of target in source, 5 * or -1 if target i...
分类:其他好文   时间:2015-06-30 00:02:52    阅读次数:176
[LintCode] 合并排序数组II
1 class Solution { 2 public: 3 /** 4 * @param A: sorted integer array A which has m elements, 5 * but size of A is m+n 6 ...
分类:编程语言   时间:2015-06-29 23:48:23    阅读次数:346
[LintCode] 二叉树的中序遍历
The recursive solution is trivial and I omit it here.Iterative Solution using Stack (O(n)time andO(n)space): 1 /** 2 * Definition of TreeNode: 3 * c.....
分类:其他好文   时间:2015-06-29 19:52:58    阅读次数:121
[LintCode] 二叉树的后序遍历
The recursive solution is trivial and I omit it here.Iterative Solution using Stack (O(n)time andO(n)space): 1 /** 2 * Definition of TreeNode: 3 * c.....
分类:其他好文   时间:2015-06-29 19:33:05    阅读次数:102
[LintCode] 合并排序数组
A subroutine of merge sort. 1 class Solution { 2 public: 3 /** 4 * @param A and B: sorted integer array A and B. 5 * @return: A new sort...
分类:编程语言   时间:2015-06-29 19:23:28    阅读次数:403
[LintCode] 最长公共前缀
1 class Solution { 2 public: 3 /** 4 * @param strs: A list of strings 5 * @return: The longest common prefix 6 */ 7 string...
分类:其他好文   时间:2015-06-29 16:36:19    阅读次数:197
[LintCode] 二叉树的前序遍历
The recursive solution is trivial and I omit it here.Iterative Solution using Stack (O(n) time and O(n) space): 1 /** 2 * Definition of TreeNode: 3 .....
分类:其他好文   时间:2015-06-29 16:17:05    阅读次数:106
[LintCode] Find the Weak Connected Component in the Directed Graph
Find the Weak Connected Component in the Directed GraphFind the number Weak Connected Component in the directed graph. Each node in the graph contains...
分类:其他好文   时间:2015-06-29 14:33:09    阅读次数:125
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!