public static int binarySearchNonAsc(int[] array, int k) {
		if(array==null || array.length==0) {
			return -1;
		}
		
		int start = 0;
		int end = array.length-1;
		
		while(start <= end) {
			// Attention: This is wrong way
			// it fails if the sum of low and high 
			// is greater than the maximum positive 
			// int value
			// int mid = (start + end)/2; 
			
			// Right way is:
			int mid = start + (end-start)/2;
			
			if(array[mid] == k) {
				return mid;
			} else if(array[mid] > k) {
				start = mid + 1;
			} else if(array[mid] < k) {
				end = mid - 1;
			}
		}
		
		return -1;
	}