private static int findCrossover(int[] input, int k, int start, int end) {
        //base cases
        if(input[start] > k){
            return start;
        }

        //base cases
        if(input[end] < k){
            return end;
        }

        int mid = (start + end)/2;
        //if number to find is between mid and its siblings return this mid point

        if(input[mid] ==k || (input[mid]<k && input[mid+1]>k) || (input[mid]>k && input[mid-1]<k) ){
            return mid;
        }

        // if x is lesser then left sibling, recurse on left array
        if(input[mid]<k && input[mid+1]<k){
            return findCrossover(input,k,mid+1, end);
        } else {
            // else recurse on right
            return findCrossover(input,k,start, mid -1);
        }


    }