Global Payments Interview Question

Coding challenge - check for balanced parentheses