| Deep copy | - | orig keeps all initial values | [[1,1,1],[1,0,1],[1,1,1]] |
| (0,0), (0,1), (0,2), (1,0) | 1 at each | no painting | [[1,1,1],[1,0,1],[1,1,1]] |
| (1,1) | 0 | set row cell (1,0) to 0 | [[1,1,1],[0,0,1],[1,1,1]] |
| same zero | 0 | set row cell (1,1) to 0 | [[1,1,1],[0,0,1],[1,1,1]] |
| same zero | 0 | set row cell (1,2) to 0 | [[1,1,1],[0,0,0],[1,1,1]] |
| same zero | 0 | set column cell (0,1) to 0 | [[1,0,1],[0,0,0],[1,1,1]] |
| same zero | 0 | set column cell (1,1) to 0 | [[1,0,1],[0,0,0],[1,1,1]] |
| same zero | 0 | set column cell (2,1) to 0 | [[1,0,1],[0,0,0],[1,0,1]] |
| (1,2), (2,0), (2,1), (2,2) | 1 at each in orig | no painting, despite new input zeros | [[1,0,1],[0,0,0],[1,0,1]] |
| Finish | - | original matrix now holds result | [[1,0,1],[0,0,0],[1,0,1]] |