Remove redundant parentheses from an arithmetic expression

Its a interview question. I have not been able to get any optimal solution.
Can someone share the logic and code for this. (preferably in Java)

e.g : ((ab)+c) should become ab+c.

My logic is Parenthesis are redundant if at least one of the operators has lower precedence than an operator attached directly to the parenthesized expression on either side of it.
But I could not reach to final code.

Can someone help…??
Thanks in Advance…!!

Have a look at this link of stackoverflow u will find what u need

But this algo does not work for expressions like a+(bc)+d, where brackets for bc is redundant.