DeepCode interview question

Asked to solve the "verify the braces" algorithmic problem in a Google Doc.