Solution to the Sub-task: Finding Neighboring Traversable Indices

The solution to the Sub-task "Finding neighboring traversable indices" of the project "Maze Solver".

We'll cover the following

Finding neighboring traversable indices

For any index in the two-dimensional array (this.grid), we need to know the possible indices that can move to the array. This is where getNeighbours method comes in. Look at how we would implement it below.

Get hands-on with 1200+ tech skills courses.