摘要:
想到map了,可惜没想到用erase来节省空间,看了网上答案 1 class Solution { 2 public: 3 int longestConsecutive(vector &num) { 4 // Start typing your C/C++ solution ... 阅读全文
posted @ 2013-04-02 17:27
ying_vincent
阅读(232)
评论(0)
推荐(0)
摘要:
string.erase没掌握好,悲了个剧,2次过 1 class Solution { 2 public: 3 string longestCommonPrefix(vector &strs) { 4 // Start typing your C/C++ solution ... 阅读全文
posted @ 2013-04-02 15:56
ying_vincent
阅读(213)
评论(0)
推荐(0)
摘要:
一些小问题, “”的输出我的是[], 但是答案却是[""], 比较难理解,3次过 1 class Solution { 2 public: 3 void dfs(vector &ret, string tmp, map refer, string digits, int beg) { 4 ... 阅读全文
posted @ 2013-04-02 15:44
ying_vincent
阅读(175)
评论(0)
推荐(0)
摘要:
初始length的时候忘给了0了,2次过 1 class Solution { 2 public: 3 int lengthOfLastWord(const char *s) { 4 // Start typing your C/C++ solution below 5 ... 阅读全文
posted @ 2013-04-02 15:19
ying_vincent
阅读(156)
评论(0)
推荐(0)
摘要:
没想出来,看了网上答案再改了改 1 class Solution { 2 public: 3 struct node { 4 int left; 5 int right; 6 }; 7 int largestRectangleArea(vect... 阅读全文
posted @ 2013-04-02 05:11
ying_vincent
阅读(242)
评论(0)
推荐(0)
浙公网安备 33010602011771号