Tripadvisor Interview Question

Leetcode Vaild Parenthesis but more cutomised easy version