We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The initial element of the provided grid (grid[0][0]) is NaN when executing JavaScript code.
grid[0][0]
NaN
Executing the JavaScript code snippet below results in the grid's first element becoming NaN:
class Solution { /** * @param {number[][]} grid * @returns {number} */ shortestPath(grid) { console.log(grid); } }
Output:
[ [ NaN, 0, 0, 0 ], [ 1, 1, 0, 0 ], [ 0, 0, 0, 1 ], [ 0, 1, 0, 0 ] ]
The grid provided should contain valid numeric values (0 or 1) without any NaN values.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Bug Report for [Matrix BFS Problem on NeetCode.io](https://neetcode.io/problems/matrixBFS)
Issue
The initial element of the provided grid (
grid[0][0]
) isNaN
when executing JavaScript code.Observed Behavior
Executing the JavaScript code snippet below results in the grid's first element becoming
NaN
:Output:
Expected Behavior
The grid provided should contain valid numeric values (0 or 1) without any
NaN
values.Steps to Reproduce
Environment
The text was updated successfully, but these errors were encountered: