| 1 | Start scanning | None | {} | [] | 0 | [['1','1','0'],['0','1','0'],['0','0','1']] |
| 2 | Found '1' at (0,0) | (0,0) | {(0,0)} | [(0,0)] | 1 | [['1','1','0'],['0','1','0'],['0','0','1']] |
| 3 | BFS dequeue (0,0) | (0,0) | {(0,0)} | [] | 1 | [['1','1','0'],['0','1','0'],['0','0','1']] |
| 4 | Check neighbors of (0,0) | (0,0) | {(0,0),(0,1)} | [(0,1)] | 1 | [['1','1','0'],['0','1','0'],['0','0','1']] |
| 5 | BFS dequeue (0,1) | (0,1) | {(0,0),(0,1)} | [] | 1 | [['1','1','0'],['0','1','0'],['0','0','1']] |
| 6 | Check neighbors of (0,1) | (0,1) | {(0,0),(0,1),(1,1)} | [(1,1)] | 1 | [['1','1','0'],['0','1','0'],['0','0','1']] |
| 7 | BFS dequeue (1,1) | (1,1) | {(0,0),(0,1),(1,1)} | [] | 1 | [['1','1','0'],['0','1','0'],['0','0','1']] |
| 8 | Check neighbors of (1,1) | (1,1) | {(0,0),(0,1),(1,1)} | [] | 1 | [['1','1','0'],['0','1','0'],['0','0','1']] |
| 9 | Continue scanning | (1,2) | {(0,0),(0,1),(1,1)} | [] | 1 | [['1','1','0'],['0','1','0'],['0','0','1']] |
| 10 | Found '1' at (2,2) | (2,2) | {(0,0),(0,1),(1,1),(2,2)} | [(2,2)] | 2 | [['1','1','0'],['0','1','0'],['0','0','1']] |
| 11 | BFS dequeue (2,2) | (2,2) | {(0,0),(0,1),(1,1),(2,2)} | [] | 2 | [['1','1','0'],['0','1','0'],['0','0','1']] |
| 12 | Check neighbors of (2,2) | (2,2) | {(0,0),(0,1),(1,1),(2,2)} | [] | 2 | [['1','1','0'],['0','1','0'],['0','0','1']] |
| 13 | End scanning | None | {(0,0),(0,1),(1,1),(2,2)} | [] | 2 | [['1','1','0'],['0','1','0'],['0','0','1']] |