ByteDance interview question

Longest valid parenthesis substring