Last active
December 14, 2015 19:28
-
-
Save KodeSeeker/5136430 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Pair<L,R> { | |
private L l; | |
private R r; | |
public Pair(L l, R r){ | |
this.l = l; | |
this.r = r; | |
} | |
public L getL(){ return l; } | |
public R getR(){ return r; } | |
public void setL(L l){ this.l = l; } | |
public void setR(R r){ this.r = r; } | |
} | |
ArrayList<Pair<Integer,Integer>> zeroList=new ArrayList<Pair<Integer,Integer>>(); | |
for(int i=0;i<rows;i++){ | |
for (int j=0;j<col;j++){ | |
if(a[i][j]==0){ | |
zeroList.add(new Pair <Integer,Integer>(i,j)); | |
} | |
} | |
return zeroList; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment