Remove extra brackets
2010-09-25 16:43 wansishuang 阅读(166) 评论(0) 编辑 收藏 举报I have a expression containing extra brackets .Write an algo which can remove unwanted brackets like expression is (((a+d)*(a-2))) so we shuld be able to get (a+d)*(a-2)
One solution:
Think it will be good to start with converting this to Hungarian notation (using recursion)
And then convert back to normal view with brackets