PubMatic interview question

solving the balanced parentheses problem using my own created stack class