Bit-by-Bit summation: 1 class Solution { 2 public: 3 /* 4 * @param a: The first integer 5 * @param b: The second integer 6 * @retur...
分类:
其他好文 时间:
2015-06-29 00:30:16
阅读次数:
124
BFS: 1 /** 2 * Definition for Directed graph. 3 * struct DirectedGraphNode { 4 * int label; 5 * vector neighbors; 6 * DirectedGraphNo...
分类:
编程语言 时间:
2015-06-29 00:15:31
阅读次数:
527
Find the Connected Component in the Undirected GraphFind the number connected component in the undirected graph. Each node in the graph contains a lab...
分类:
其他好文 时间:
2015-06-28 22:50:42
阅读次数:
649
基于快速排序: 1 class Solution { 2 public: 3 /* 4 * param k : description of k 5 * param nums : description of array and index 0 ~ n-1 6 ...
分类:
其他好文 时间:
2015-06-28 18:44:50
阅读次数:
233
1 class Solution { 2 public: 3 /** 4 * @param grid: a list of lists of integers. 5 * @return: An integer, minimizes the sum of all numb...
分类:
其他好文 时间:
2015-06-28 17:30:04
阅读次数:
369
1 class Solution { 2 public: 3 /** 4 * @param A, B: Two strings. 5 * @return: The length of longest common subsequence of A and B. 6 ...
分类:
其他好文 时间:
2015-06-28 17:04:49
阅读次数:
107
1 class Solution { 2 public: 3 // param n : description of n 4 // return: description of return 5 long long trailingZeros(long long n) ...
分类:
其他好文 时间:
2015-06-28 17:04:28
阅读次数:
213
1 class Solution { 2 public: 3 /** 4 * @param A, B: Two string. 5 * @return: the length of the longest common substring. 6 */ ...
分类:
其他好文 时间:
2015-06-28 17:00:49
阅读次数:
94
1 class Queue { 2 public: 3 stack stack1; 4 stack stack2; 5 6 Queue() { 7 // do intialization if necessary 8 } 9 10 void...
分类:
其他好文 时间:
2015-06-28 16:57:59
阅读次数:
120
1 class MinStack { 2 public: 3 MinStack() { 4 // do initialization if necessary 5 } 6 7 void push(int number) { 8 // wri...
分类:
其他好文 时间:
2015-06-28 16:56:51
阅读次数:
115