I'm pretty stuck in finding a proper solution for a given problem, been looking for some ideas over the internet. Wasn't be able to find any.
Problem is: writing a program that takes from the standard input an expression without left parentheses and prints the equivalent infix expression with the parentheses inserted.
Given expression: 1 + 2) * 3 - 4)* 5 - 6)))
Output: ((1 + 2) * ((3 - 4) * (5 - 6)))
What can be the best approach to solve this problem?