0
public void setZeroes(int[][] matrix) its given wrong test cases
class Solution { public void setZeroes(int[][] matrix) { int m=matrix.length; int n=matrix[0].length; for(int i=0;i<m;i++){ for(int j=0;j<n;j++){ if(matrix[i][j]==0){ helper(matrix,i,j); } } } } public void helper(int[][] matrix,int i,int j){ for(int i1=0;i1<matrix.length;i1++){ matrix[i1][j]=0; } for(int j1=0;j1<matrix[0].length;j1++){ matrix[i][j1]=0; } return; } }
1 Odpowiedź
+ 3
Your question and details are not clear. Please add full details..