由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
JobHunting版 - 大家看看这道题code怎么写
相关主题
大家看看这道题code怎么写今天做题发现了一个很不明显的bug
ASCII字符发音总结贴一个OJ 的 longest valid parenthesis
前几天去一投资机构面试,大骂其一通,爽!问个括号问题的迭代解法
请教个C题目弱问一道c++语法题
请问一道很难的面试题leetcoede新题Valid Palindrome
one facebook software problemgenerate parenthesis这题有没有iterative解法啊?
fb面试题【转】M家
readLine和balanceParanthesis的code谁写了?发几个面经(8) Roket Fuel 电面 + onsite
相关话题的讨论汇总
话题: given话题: brackets话题: its话题: ex2话题: ex1
进入JobHunting版参与讨论
1 (共1页)
g*****u
发帖数: 298
1
Given an expression remove the unnecessary brackets in it with out creating
an ambiguity in its execution.
input output
ex1: (a+(b)+c) a+b+c
ex2: (a*b)+c a*b+c
b***e
发帖数: 1419
2
This is a simple parsing/pretty printing problem. First parse the given
string to an abstract syntax tree, then recurse the tree structure and
apply a straightforward pretty printing algorithm: for each internal node
(representing a binary operator), if its precedence is lower than the
precedence of its parent node, then print surrounding parenthesis.
n******h
发帖数: 50
3
if there are only addition and multiplication, it seems to me the only cases
where we need to keep the brackets are:
*(..+..+..) and (..+..+..)*
1 (共1页)
进入JobHunting版参与讨论
相关主题
发几个面经(8) Roket Fuel 电面 + onsite请问一道很难的面试题
24点问题扩展one facebook software problem
rocket fuel第一轮面经fb面试题【转】
这个Generate Parentheses非递归的方法咋写readLine和balanceParanthesis的code谁写了?
大家看看这道题code怎么写今天做题发现了一个很不明显的bug
ASCII字符发音总结贴一个OJ 的 longest valid parenthesis
前几天去一投资机构面试,大骂其一通,爽!问个括号问题的迭代解法
请教个C题目弱问一道c++语法题
相关话题的讨论汇总
话题: given话题: brackets话题: its话题: ex2话题: ex1