title: To check if parenthesis are balanced- Without stack
body: <p>Suppose I have a very huge file and I want to check if parenthesis are balanced. I can't use stack, right? Because it'd result in a stack overflow. What approach I can use?</p>