Determine if an input string of parentheses is valid.
O(n)
Solution code coming soon. Practice on LeetCode for now.