You are given an grid. A path in the grid starts at the top left cell
The parentheses string corresponding to a path is formed by concatenating the characters of all cells visited along the path in the order they are traversed.
Return true if there is a path from false.
A parentheses string is valid if:
It is an empty string,
It can be written as the concatenation of two valid parentheses strings, or
It can be written as '(' followed by a valid parentheses string followed by ')'.
Constraints:
m grid.length
n grid[i].length
m, n
grid[i][j] is either '(' or ')'
You are given an grid. A path in the grid starts at the top left cell
The parentheses string corresponding to a path is formed by concatenating the characters of all cells visited along the path in the order they are traversed.
Return true if there is a path from false.
A parentheses string is valid if:
It is an empty string,
It can be written as the concatenation of two valid parentheses strings, or
It can be written as '(' followed by a valid parentheses string followed by ')'.
Constraints:
m grid.length
n grid[i].length
m, n
grid[i][j] is either '(' or ')'