Log in to run or submit
Use first row/col as markers to get O(1) extra space.
(r,c)
matrix[r][0]=0
matrix[0][c]=0