Algorithm Designa66_q3a_sandworm
Sandworm
f00674df-8cfd-4c11-b222-d71adce9bfd2.cppC++
1// Loading code...Selected Submission
40 / 100
0.16s
9956 KB
BFS/DFSImplementation
Time Comp.
O(R * C)
Space Comp.
O(R * C)
Readability
7/10
"The code performs a breadth-first search (BFS) on two grids, North and South, to explore connected components of '0' values. It uses a queue to manage the exploration and handles transitions between the grids based on sandworm positions, making BFS the core algorithm."
History
| Attempt | Points | Time ↓ |
|---|---|---|
| Try #4 | 40 | 3/29/2025 |
| Try #3 | 0 | 3/29/2025 |
| Try #2 | 40 | 3/29/2025 |
| Try #1 | 35 | 3/28/2025 |