Can anyone explain the O(1) space solution?


#1

Please help, I am not able to understand the editorial.


#2

First Visit the array and store the rows and col to be made zeros
Then in second iteration make that rows and col zero