Glossary: Coding Interviews in Java
Visited array
Also written: visited, boolean[rows][cols]
A `boolean` array the same size as a grid that records which cells have been seen, so BFS and DFS never process a cell twice. It starts all `false`.
Glossary: Coding Interviews in Java
Also written: visited, boolean[rows][cols]
A `boolean` array the same size as a grid that records which cells have been seen, so BFS and DFS never process a cell twice. It starts all `false`.