摘要:
C++,time: O(m*n)space: O(m*n) 1 class Solution { 2 public: 3 /** 4 * @param grid: a list of lists of integers. 5 * @return: An integer, ... 阅读全文
posted @ 2015-11-27 14:36
ZH奶酪
阅读(228)
评论(0)
推荐(0)
摘要:
C++ 1 class Solution { 2 public: 3 /** 4 * @param n the nth 5 * @return the nth sequence 6 */ 7 string countAndSay(int n) { 8 ... 阅读全文
posted @ 2015-11-27 13:18
ZH奶酪
阅读(284)
评论(0)
推荐(0)
摘要:
C++/** * Definition of TreeNode: * class TreeNode { * public: * int val; * TreeNode *left, *right; * TreeNode(int val) { * this->v... 阅读全文
posted @ 2015-11-27 11:09
ZH奶酪
阅读(209)
评论(0)
推荐(0)
摘要:
C++ 1 /** 2 * Definition of TreeNode: 3 * class TreeNode { 4 * public: 5 * int val; 6 * TreeNode *left, *right; 7 * TreeNode(int val... 阅读全文
posted @ 2015-11-27 11:07
ZH奶酪
阅读(265)
评论(0)
推荐(0)
摘要:
C++ 1 class Solution { 2 public: 3 /** 4 * @param num: an integer 5 * @return: an integer, the number of ones in num 6 */ 7 int... 阅读全文
posted @ 2015-11-27 10:20
ZH奶酪
阅读(580)
评论(0)
推荐(0)
摘要:
C++ 1 class Solution { 2 public: 3 /** 4 * @param A: An integer array. 5 * @param B: An integer array. 6 * @return: Cosine similari... 阅读全文
posted @ 2015-11-27 10:04
ZH奶酪
阅读(330)
评论(0)
推荐(0)
摘要:
C++,time: O(n^2)space: O(0)class Solution {public: /** * @param str: a string * @return: a boolean */ bool isUnique(string &str) { ... 阅读全文
posted @ 2015-11-27 09:54
ZH奶酪
阅读(253)
评论(0)
推荐(0)
摘要:
C++,time: O(n)space:O(n) 1 class Solution { 2 public: 3 /** 4 * @param str: a string 5 * @param offset: an integer 6 * @return: not... 阅读全文
posted @ 2015-11-27 09:31
ZH奶酪
阅读(295)
评论(0)
推荐(0)
摘要:
C++ 1 class Solution { 2 public: 3 /** 4 * @param dictionary: a vector of strings 5 * @return: a vector of strings 6 */ 7 vecto... 阅读全文
posted @ 2015-11-27 01:12
ZH奶酪
阅读(302)
评论(0)
推荐(0)
摘要:
C++ 1 class Solution { 2 public: 3 /** 4 * @param A: A string includes Upper Case letters 5 * @param B: A string includes Upper Case let... 阅读全文
posted @ 2015-11-27 00:57
ZH奶酪
阅读(224)
评论(0)
推荐(0)
摘要:
C++ 1 class Solution { 2 public: 3 /** 4 * @param n: An integer 5 * @return: An integer 6 */ 7 int climbStairs(int n) { 8 ... 阅读全文
posted @ 2015-11-27 00:45
ZH奶酪
阅读(258)
评论(0)
推荐(0)
摘要:
C++,递归 1 /** 2 * Definition of TreeNode: 3 * class TreeNode { 4 * public: 5 * int val; 6 * TreeNode *left, *right; 7 * TreeNode(int ... 阅读全文
posted @ 2015-11-27 00:24
ZH奶酪
阅读(268)
评论(0)
推荐(0)

浙公网安备 33010602011771号