Thoughtscrest interview question

longest valid paranthesis leetcode 32nd qn