Array
2267. Check if There Is a Valid Parentheses String Path
A path through this grid is a string, and the only thing that matters about the part already walked is how many open brackets are still unclosed. Not which cells you stepped on, not in what order. One integer. That collapse is the problem.
Loading…