Freshworks interview question

Parenthesis validation using stacks - check leetcode