码迷,mamicode.com
首页 >  
搜索关键字:parentheses    ( 825个结果
[POJ Solutions] Brackets Sequence
This problem can be solved elegantly using dynamic programming.We maintain two arrays:cnt[i][j] --- number of parentheses needed to add within s[i..j]...
分类:其他好文   时间:2015-06-22 19:12:15    阅读次数:202
Fraction to Recurring Decimal -- leetcode
Given two integers representing the numerator and denominator of a fraction, return the fraction in string format. If the fractional part is repeating, enclose the repeating part in parentheses. ...
分类:其他好文   时间:2015-06-22 15:03:43    阅读次数:181
[LeetCode-JAVA] Basic Calculator
题目:Implement a basic calculator to evaluate a simple expression string.The expression string may contain open(and closing parentheses), the plus+or mi...
分类:编程语言   时间:2015-06-20 11:46:17    阅读次数:185
Basic Calculator
Basic Calculator问题:Implement a basic calculator to evaluate a simple expression string.The expression string may contain open(and closing parentheses)...
分类:其他好文   时间:2015-06-17 23:06:49    阅读次数:192
Java for LeetCode 224 Basic Calculator
Implement a basic calculator to evaluate a simple expression string.The expression string may contain open ( and closing parentheses ), the plus + or ...
分类:编程语言   时间:2015-06-15 22:02:12    阅读次数:292
[LeetCode] Basic Calculator
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 sign -, non-nega...
分类:其他好文   时间:2015-06-15 16:26:59    阅读次数:151
[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...
分类:其他好文   时间:2015-06-15 13:04:56    阅读次数:82
basic calculator (stack problem)
Implement a basic calculator to evaluate a simple expression string.The expression string may contain open(and closing parentheses), the plus+or minus...
分类:其他好文   时间:2015-06-15 09:11:32    阅读次数:122
Uva 673 Parentheses Balance
题意:判断一个是否是合法的,此式子合法的条件是: 1.空串是合法的 2.如果A和B都是合法的, 那么AB也是合法的 3.如果A是合法的,那么(A)和[A]也是合法的思路: 可以用堆栈的方法,如果读入一个左符号,则压栈,反之,从栈中弹出一个符号,如果是对应的左符号,则继续,如果不能...
分类:其他好文   时间:2015-06-14 13:45:13    阅读次数:110
【LeetCode】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 sign -, non-negative integer...
分类:其他好文   时间:2015-06-14 12:31:38    阅读次数:122
825条   上一页 1 ... 52 53 54 55 56 ... 83 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!