I need an algorithm to insert parenthesis in an infix expression. example:
input: -4 + 5 % 2 * 1.7 (2+16) output: ( (-4)+( ((5%2)*1.7)*(2+16) ) )