Braze interview question

Find valid parentheses in string