Algorithm Designex05e1_shortest
Shortest Path in Grid
40aaaf0c-c281-48f2-9cc7-88f059cc6f98.cppC++
1// Loading code...Selected Submission
100 / 100
0.001s
1516 KB
BFS/DFSImplementation
Time Comp.
O(R * C)
Space Comp.
O(R * C)
Readability
5/10
"The code implements a Breadth-First Search (BFS) algorithm to find the shortest path from the top-left corner to the bottom-right corner of a grid. It uses a queue to explore the grid level by level, keeping track of visited cells and the shortest distance to each cell."
History
| Attempt | Points | Time ↓ |
|---|---|---|
| Try #2 | 100 | 3/25/2025 |
| Try #1 | 0 | 3/25/2025 |