Given an expression (A+(B*C)), remove redundant parentheses. Output in this case should be A+B*C. My initial solution: (1) Convert expression from infix to postfix (or prefix) [This way, all parentheses are removed] (2) Now, convert postfix (or prefix) expression back to infix.
Is there a better way of doing this? -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en.
