摘要:
想到map了,可惜没想到用erase来节省空间,看了网上答案 1 class Solution { 2 public: 3 int longestConsecutive(vector &num) { 4 // Start typing your C/C++ solution ... 阅读全文
摘要:
string.erase没掌握好,悲了个剧,2次过 1 class Solution { 2 public: 3 string longestCommonPrefix(vector &strs) { 4 // Start typing your C/C++ solution ... 阅读全文
摘要:
一些小问题, “”的输出我的是[], 但是答案却是[""], 比较难理解,3次过 1 class Solution { 2 public: 3 void dfs(vector &ret, string tmp, map refer, string digits, int beg) { 4 ... 阅读全文
摘要:
初始length的时候忘给了0了,2次过 1 class Solution { 2 public: 3 int lengthOfLastWord(const char *s) { 4 // Start typing your C/C++ solution below 5 ... 阅读全文
摘要:
没想出来,看了网上答案再改了改 1 class Solution { 2 public: 3 struct node { 4 int left; 5 int right; 6 }; 7 int largestRectangleArea(vect... 阅读全文