Useless Brackets: Vikas Sir
4 posters
Page 1 of 1
Useless Brackets: Vikas Sir
Given a an expression find whether there are useless brackets or not
example
(A(+)B) useless bracket around + sign
example
(A(+)B) useless bracket around + sign
ballu- Posts : 58
Join date : 2009-02-01
Re: Useless Brackets: Vikas Sir
push the operators and operands until u get a closing bracket . on getting it pop the topmost element store it in a temp var pop once more(this time the opening bracket).push the saved one .
plzz tell me whether dis will work or not
plzz tell me whether dis will work or not
udita- Posts : 11
Join date : 2009-02-01
Re: Useless Brackets: Vikas Sir
How about converting to prefix.removing all brackets,
converting back??
converting back??
Re: Useless Brackets: Vikas Sir
i also think above answer will work is there any other better solution??
mnnit.rahul- Posts : 51
Join date : 2009-02-01
Similar topics
» INFINITY : Vikas Sir
» Output:Vikas Sir
» PAlindrome:Vikas Sir
» Majority Number: Vikas Sir
» Binary Search:Vikas Sir
» Output:Vikas Sir
» PAlindrome:Vikas Sir
» Majority Number: Vikas Sir
» Binary Search:Vikas Sir
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum
|
|