Microsoft interview question

Leetcode easy problem - Valid Parentheses