iOPEX Technologies interview question

2.check for balanced paranthesis