摘要:
Compare two version numbersversion1andversion2.Ifversion1>version2return 1, ifversion1 val2)20 return 1;21 else if(val1 < ... 阅读全文
摘要:
Given a string containing just the characters '(', ')', '{', '}', '[' and ']', determine if the input string is valid. The brackets must close in the 阅读全文
摘要:
Write a function to find the longest common prefix string amongst an array of strings.求很多string的公共前缀,用个两重循环就可以,代码如下: 1 class Solution { 2 public: 3 ... 阅读全文
摘要:
Given a linked list, return the node where the cycle begins. If there is no cycle, returnnull.Note:Do not modify the linked list.Follow up:Can you sol... 阅读全文
摘要:
Given a collection of numbers that might contain duplicates, return all possible unique permutations.For example,[1,1,2]have the following unique perm... 阅读全文
摘要:
Given a collection of numbers, return all possible permutations.For example,[1,2,3]have the following permutations:[1,2,3],[1,3,2],[2,1,3],[2,3,1],[3,... 阅读全文