CarGurus Interview Question

Classic “Valid Parentheses” leetcode problem