KPMG Interview Question

The Valid Parentheses Question from Leetcode