Meta interview question

Valid parentheses Leetcode problem