码迷,mamicode.com
首页 >  
搜索关键字:parentheses    ( 825个结果
【leetcode with java】32 Longest Valid Parentheses O(n)
这个题目leetcode上提示用动态规划,但是那样要O(n^2)。我自己想出了一个O(n)的算法,并提交通过。【题目】Given a string containing just the characters '(' and ')', find the length of the longest valid (well-formed) parentheses substring. For "((...
分类:编程语言   时间:2015-05-06 11:00:58    阅读次数:123
LeetCode22 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: "((()))", "(()())", "(())()", "()(()...
分类:其他好文   时间:2015-05-05 14:29:11    阅读次数:172
LeetCode 20 Valid Parentheses 括号匹配问题
题目: Given a string containing just the characters '(', ')', '{', '}', '[' and ']', determine if the input string is valid. The brackets must close in the correct order, "()" and "()[]{}" are...
分类:其他好文   时间:2015-05-05 10:35:05    阅读次数:144
Java for LeetCode 022 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:"((...
分类:编程语言   时间:2015-05-03 17:18:23    阅读次数:121
leetcode-Valid Parentheses
题目描述 Given a string containing just the characters '(', ')', '{', '}', '[' and ']', determine if the input string is valid. The brackets must close in the correct order, "()" and "()[]{}" ar...
分类:其他好文   时间:2015-05-03 14:42:13    阅读次数:193
[LeetCode] Longest Valid Parentheses
Longest Valid Parentheses Given a string containing just the characters '(' and ')', find the length of the longest valid (well-formed) parentheses substring. For "(()", the longest valid pa...
分类:其他好文   时间:2015-04-29 15:06:06    阅读次数:126
leetcode-22 Generate Parentheses
?? 问题描述:Given n pairs of parentheses, write a function to generate allcombinations of well-formed parentheses. For example, given n = 3, a solution setis: "((()))","(()())", "(())()", "()((...
分类:其他好文   时间:2015-04-28 18:34:13    阅读次数:112
[Java] LeetCode32 Longest Valid Parentheses
[Java] LeetCode32 Longest Valid Parentheses...
分类:编程语言   时间:2015-04-28 11:56:33    阅读次数:125
【leetcode】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:"((...
分类:其他好文   时间:2015-04-25 11:58:22    阅读次数:95
[LeetCode]32.Longest Valid Parentheses
题目Given a string containing just the characters ‘(’ and ‘)’, find the length of the longest valid (well-formed) parentheses substring.For “(()”, the longest valid parentheses substring is “()”, which h...
分类:其他好文   时间:2015-04-23 21:49:15    阅读次数:156
825条   上一页 1 ... 57 58 59 60 61 ... 83 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!