public int findKthLargest(int k){
		
		if(k==1){
			return arr[0][0];
		}
		
		
		
		int length=arr.length;	
		if(k>(length*length)){
			return -1;
		}
		
		
		int temp=k;
		
		for(int i=0,j=0;  temp>0   ; ){
			System.out.println("i :"+i +" and j :"+j);
			
			if(arr[i][j+1] > arr[i+1][j]){
				i++;
				if(i>=length){
					i=0;
				}
			}else{
				j++;
				if(j>=length){
					j=0;
				}
			}
			
			if(--temp == 0){
				return arr[i][j];
			}
		}
		System.out.println("reached out of loop");
		return -1;
		
	}