All problems
› Grid problems
Grid problems
42 Grid DSA practice problems on CampusCode, each with statement, examples and constraints.
607. Rotting Oranges — BFS via Queue
Easy
Stack
639. Walls and Gates
Medium
Stack
640. Shortest Path in Binary Matrix
Medium
Stack
642. As Far from Land as Possible
Medium
Stack
643. Map of Highest Peak
Medium
Stack
647. Snakes and Ladders
Medium
Stack
989. Number of Islands (DFS)
Easy
Graphs
990. Flood Fill Algorithm
Easy
Graphs
991. Max Area of Island
Easy
Graphs
992. Count Islands Using BFS
Easy
Graphs
993. Surrounded Regions — Capture Os
Easy
Graphs
994. Pacific Atlantic Water Flow
Easy
Graphs
995. Rotting Oranges — Multi-Source BFS
Easy
Graphs
996. 01 Matrix — Distance to Nearest Zero
Easy
Graphs
997. Shortest Path in Binary Matrix
Easy
Graphs
998. Check if There is a Valid Path in Grid
Easy
Graphs
999. Island Perimeter
Easy
Graphs
1000. Number of Closed Islands
Easy
Graphs
1001. Number of Enclaves
Easy
Graphs
1002. Count Sub Islands
Easy
Graphs
1003. Map of Highest Peak (BFS)
Easy
Graphs
1004. Walls and Gates — Multi-Source BFS
Easy
Graphs
1005. Find if Path Exists in Grid
Easy
Graphs
1006. Count Reachable Nodes from a Source
Easy
Graphs
1007. Coloring Border
Easy
Graphs
1008. Check if Path Crosses Itself
Easy
Graphs
1030. Dijkstra on Grid — Minimum Cost Path
Medium
Graphs
1033. Path with Minimum Effort
Medium
Graphs
1034. Swim in Rising Water (Dijkstra / BS)
Medium
Graphs
1051. Number of Islands II (Dynamic)
Medium
Graphs
1053. Making a Large Island
Medium
Graphs
1057. Snakes and Ladders
Medium
Graphs
1066. As Far from Land as Possible
Medium
Graphs
1067. Minimum Obstacles to Reach Corner (0-1 BFS)
Medium
Graphs
1068. Cut Off Trees for Golf Event
Medium
Graphs
1069. Minimum Cost to Make at Least One Valid Path
Medium
Graphs
1096. Shortest Bridge
Hard
Graphs
1099. Shortest Path with Obstacle Elimination
Hard
Graphs
1100. Cherry Pickup II — Two Robots
Hard
Graphs
1101. Minimum Days to Disconnect Island
Hard
Graphs
1102. Number of Increasing Paths in Grid
Hard
Graphs
1377. Maximum Students Taking Exam
Hard
Bit Manipulation