- 博客(4)
- 收藏
- 关注
原创 LeetCode: Implement strStr()
Implement strStr(). Returns a pointer to the first occurrence of needle in haystack, or null if needle is not part of haystack. class Solution { public: char *strStr(char *haystack, char *n
2013-08-16 04:36:30 495
原创 LeetCode: Merge k Sorted Lists
Merge k sorted linked lists and return it as one sorted list. Analyze and describe its complexity. Study Point: The use of priority queue #include #include #include #include #include #include #in
2013-08-13 11:48:25 512
原创 LeetCode: Generate Parentheses
Generate ParenthesesGiven n pairs of parentheses, write a function to generate all combinations of well-formed parentheses.For example, given n = 3, a solution set is:"((()))", "(()())", "(())()", "()
2013-08-07 04:58:19 513
原创 LeetCode: Count and Say
The count-and-say sequence is the sequence of integers beginning as follows: 1, 11, 21, 1211, 111221, ... 1 is read off as "one 1" or 11. 11 is read off as "two 1s" or 21. 21 is read
2013-08-05 13:10:42 716
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人