Autodesk Interview Question

Validate a string of parentheses (leetcode 20)