Qualcomm Interview Question

balanced parentheses