Learn a simple solution to the longest parentheses problem.