#32 Longest Valid Parentheses
We’ve tackled a related problem which validate a parentheses string, with a stack. Here we can use a similar technique to do the validation, yet we need detect the max substring length, so we store the `index` rather than the character in the stack(because we can easily get the character from the index).
and currently practicing leetCode online. If you are interested, maybe we can learn together.