Neighbors in a grid [mp]
Micro pattern¶
Description¶
Generate adjacent grid cells from direction offsets and check bounds before visiting them.
Problems¶
- 79. Word Search (Top Medium)
- 200. Number of Islands (Top Medium)
- 542. 01 Matrix (Google Prep)
- 130. Surrounded Regions (Top Hard)
- 212. Word Search II (Top Hard)
- 289. Game of Life (Top Hard)
- 329. Longest Increasing Path in a Matrix (Top Hard)
- 1926. Nearest Exit from Entrance in Maze (Graph Theory)
- 934. Shortest Bridge (Graph Theory)
- 1091. Shortest Path in Binary Matrix (Graph Theory)
- 864. Shortest Path to Get All Keys (Graph Theory)
- 1020. Number of Enclaves (Graph Theory)
- 1254. Number of Closed Islands (Graph Theory)
- 695. Max Area of Island (Graph Theory)
- 417. Pacific Atlantic Water Flow (Graph Theory)