码迷,mamicode.com
首页 >  
搜索关键字:parentheses    ( 825个结果
LeetCode 241. Different Ways to Add Parentheses
题目: Given a string of numbers and operators, return all possible results from computing all the different possible ways to group numbers and operators
分类:其他好文   时间:2016-02-02 18:50:56    阅读次数:217
20. Valid Parentheses
基础题目 建一个堆栈,对于这个字符串,如果是左括号就放到堆栈里面,如果是右括号,就弹出堆栈里的一个元素,如果此时堆栈是空的,肯定是不匹配的,如果弹出的不匹配,也返回false。做完以后看堆栈是不是正好的空的,如果是空的就返回true,否则就是false。 1 public boolean isVal
分类:其他好文   时间:2016-01-28 09:24:42    阅读次数:148
20. Valid Parentheses(stack)
Given a string containing just the characters'(',')','{','}','['and']', determine if the input string is valid.The brackets must close in the correct ...
分类:其他好文   时间:2016-01-27 14:30:10    阅读次数:212
*Basic Calculator
Implement a basic calculator to evaluate a simple expression string.The expression string may contain open(and closing parentheses), the plus+or minus...
分类:其他好文   时间:2016-01-16 16:36:16    阅读次数:143
Generate Parentheses
Givennpairs of parentheses, write a function to generate all combinations of well-formed parentheses.For example, givenn= 3, a solution set is:"((()))...
分类:其他好文   时间:2016-01-10 23:58:07    阅读次数:392
LeetCode(20):Valid Parentheses
Valid Parentheses:Given a string containing just the characters '(', ')', '{', '}', '[' and ']', determine if the input string is valid.The brackets m...
分类:其他好文   时间:2016-01-08 23:24:33    阅读次数:214
LeetCode Generate Parentheses
LeetCode解题之Generate Parentheses原题罗列出n组括号的所有合法的排列组合。...
分类:其他好文   时间:2015-12-23 09:27:42    阅读次数:122
LeetCode - Valid Parentheses
题目:Given a string containing just the characters '(', ')', '{', '}', '[' and ']', determine if the input string is valid.The brackets must close in th...
分类:其他好文   时间:2015-12-20 09:17:28    阅读次数:162
22. Generate Parentheses
22. Generate ParenthesesTotal Accepted:70039Total Submissions:203043Difficulty:MediumGivennpairs of parentheses, write a function to generate all comb...
分类:其他好文   时间:2015-12-19 23:06:33    阅读次数:227
leetcode Longest Valid Parentheses python
class Solution(object): def longestValidParentheses(self, s): """ :type s: str :rtype: int """ maxlen=0 s...
分类:编程语言   时间:2015-12-16 00:23:48    阅读次数:221
825条   上一页 1 ... 38 39 40 41 42 ... 83 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!