ION Group interview question

Check if a parenthesis is balanced.