码迷,mamicode.com
首页 >  
搜索关键字:parentheses    ( 825个结果
Generate Parentheses
Generate Parentheses Given n pairs of parentheses, write a function to generate all combinations of well-formed parentheses. For example, given n = 3, ...
分类:其他好文   时间:2016-10-26 00:15:55    阅读次数:113
leetcode 20. Valid Parentheses
栈的相关操作。 public class Solution { public boolean isValid(String s) { if(s == "") return true; Stack<Character> st = new Stack<Character>(); st.push(s.ch ...
分类:其他好文   时间:2016-10-23 17:18:23    阅读次数:99
Remove Invalid Parentheses
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 ...
分类:其他好文   时间:2016-10-23 11:51:21    阅读次数:149
leetcode -- medium part
22. Generate Parentheses 括号匹配数是一个卡特兰数,f(x) = (2n)!/((n+1)! * n!) , f(3) = 5 当作dfs处理,这样得到的顺序是"("从多到少的顺序。 ...
分类:其他好文   时间:2016-10-22 23:26:02    阅读次数:185
LeetCode 20 Valid Parentheses
问题: Given a string containing just the characters '(', ')', '{', '}', '[' and ']', determine if the input string is valid. The brackets must close in ...
分类:其他好文   时间:2016-10-15 16:45:39    阅读次数:123
弱校连萌 10.3
A.Best Matched Pair B.Help the Princess! C.We don't wanna work! D.Parentheses E.Similarity of Subtrees F.Escape from the Hell G.Share the Ruins Preser ...
分类:其他好文   时间:2016-10-05 21:52:35    阅读次数:151
Valid Parentheses
Given a string containing just the characters '(', ')', '{', '}', '[' and ']', determine if the input string is valid. The brackets must close in the ...
分类:其他好文   时间:2016-10-04 01:28:50    阅读次数:159
Longest Valid Parentheses
Given a string containing just the characters '(' and ')', find the length of the longest valid (well-formed) parentheses substring. For "(()", the lo ...
分类:其他好文   时间:2016-10-03 12:46:25    阅读次数:94
[LeetCode] 22. Generate Parentheses
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: ...
分类:其他好文   时间:2016-10-02 00:41:14    阅读次数:129
301. Remove Invalid Parentheses
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 ...
分类:其他好文   时间:2016-09-24 07:03:55    阅读次数:122
825条   上一页 1 ... 29 30 31 32 33 ... 83 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!