Spotify interview question

Check for balanced parentheses?