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

AttemptPoints Time
Try #61003/31/2025
Try #5303/31/2025
Try #4303/31/2025
Try #303/31/2025
Try #2303/31/2025
Try #1303/31/2025