Gap interview question

Leetcode easy/medium about parenthesis matching