AppsFlyer interview question

Valid Parentheses Leet Code Question