index through 2d array

Solutions on MaxInterview for index through 2d array by the best coders in the world

showing results for - "index through 2d array"
Eleonora
23 Oct 2016
1int[][]x;//define
2for(int i=0;i<x.length;i++){
3  for(int j=0;j<x[i].length;j++){
4    //dp something with x[i][j]
5  }
6}
Valentino
24 May 2016
1int[][]x;//define
2for(int []y:x){
3  for(int a:y){
4    //do something with a
5  }
6}
similar questions
queries leading to this page
index through 2d array