Algorithm Designa59_q3_hole
Hole
7065114d-b988-44ba-b8f5-ab69cd40b17c.cppC++
1// Loading code...Selected Submission
100 / 100
0.033s
5628 KB
BFS/DFSImplementation
Time Comp.
O(N*M)
Space Comp.
O(N*M)
Readability
5/10
"The code implements a Breadth-First Search (BFS) to find the minimum number of steps to reach the boundary of a grid, avoiding blocked cells. It uses a queue to explore the grid and updates distances based on whether a cell is cleared or blocked."
History
| Attempt | Points | Time ↓ |
|---|---|---|
| Try #6 | 100 | 3/31/2025 |
| Try #5 | 30 | 3/31/2025 |
| Try #4 | 30 | 3/31/2025 |
| Try #3 | 0 | 3/31/2025 |
| Try #2 | 30 | 3/31/2025 |
| Try #1 | 30 | 3/31/2025 |