Skip to content

Instantly share code, notes, and snippets.

@KodeSeeker
Last active December 14, 2015 19:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save KodeSeeker/5136430 to your computer and use it in GitHub Desktop.
Save KodeSeeker/5136430 to your computer and use it in GitHub Desktop.
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