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
| Attempt | Points | Time ↓ |
|---|---|---|
| Try #6 | 100 | 5/1/2025 |
| Try #5 | 100 | 3/25/2025 |
| Try #4 | 100 | 3/25/2025 |
| Try #3 | 100 | 3/25/2025 |
| Try #2 | 100 | 3/25/2025 |
| Try #1 | 100 | 3/25/2025 |