Algorithm Designda67_f_border_extend

Border Extend

ec717399-26eb-4e11-a7e0-bb0f8e5ef9a8.cppC++
1// Loading code...

Selected Submission

100 / 100
0.123s
6464 KB
BFS/DFSImplementation
Time Comp.
O(R * C)
Space Comp.
O(R * C)
Readability
6/10

"The code performs a Breadth-First Search (BFS) to propagate a value (2) from initial source cells (value 1) outwards up to a maximum distance. It uses a queue to manage the exploration of cells and a visited matrix to avoid cycles, which are core components of BFS."

History

AttemptPoints Time
Try #61005/1/2025
Try #51003/25/2025
Try #41003/25/2025
Try #31003/25/2025
Try #21003/25/2025
Try #11003/25/2025