这星期听别人说在做LeetCode,让他分享一题来看看。试了感觉挺有意思,可以培养自己的思路,还能方便的查看优秀的解决方案。准备自己也开始。 解决方案通常有多种多样,我觉得把自己的解决思路记录下来,阶段性查看,一定能对自己有帮助。 这是我做的第一题,所以记录也从这题开始,之后尽力以简短的说明,描述出 ...
分类:
其他好文 时间:
2017-11-11 00:33:44
阅读次数:
266
Remove the minimum number of invalid parentheses in order to make the input string valid. Return all possible results. Note: The input string may cont ...
分类:
其他好文 时间:
2017-11-08 20:06:49
阅读次数:
104
描述 Given n pairs of parentheses, write a function to generate all combinations of wellformed parentheses.For example, given n = 3, a solution set is:" ...
分类:
其他好文 时间:
2017-11-07 18:03:46
阅读次数:
131
Given a string containing just the characters '(' and ')', find the length of the longest valid (well-formed) parentheses substring. For "(()", the lo ...
分类:
其他好文 时间:
2017-11-04 13:34:15
阅读次数:
116
分享三个hard难度的题,个人感觉比较有意思和有实际意义的三道,思路上和上次的有些区别,不过大致上还是一样的。 1:All Valid Permutations Of Parentheses II Get all valid permutations of l pairs of (), m pair ...
分类:
其他好文 时间:
2017-10-26 11:37:22
阅读次数:
181
Given a string of numbers and operators, return all possible results from computing all the different possible ways to group numbers and operators. Th ...
分类:
其他好文 时间:
2017-10-25 21:40:03
阅读次数:
133
Given a string containing just the characters '(', ')', '{', '}', '[' and ']', determine if the input string is valid. The brackets must close in the ...
分类:
其他好文 时间:
2017-10-20 18:21:04
阅读次数:
80
Given n pairs of parentheses, write a function to generate all combinations of well-formed parentheses. For example, given n = 3, a solution set is: ...
分类:
其他好文 时间:
2017-10-17 18:43:02
阅读次数:
132
Description: Given a string containing just the characters '(', ')', '{', '}', '[' and ']', determine if the input string is valid. The brackets must ...
分类:
其他好文 时间:
2017-10-16 13:43:23
阅读次数:
176
Given a string containing just the characters '(', ')', '{', '}', '[' and ']', determine if the input string is valid. The brackets must close in the ...
分类:
其他好文 时间:
2017-10-13 12:35:39
阅读次数:
109