Amazon Interview Question

Leetcode 20. Valid Parentheses And then a variation.