package problems.problems2

class CarlosImp implements ExamMarks{
    /**
     * Return number of marks greater than a mark in marks array.
     *
     * @param h All mark's exam, h is ordered h[i] <= h[i+1]
     * @param mark a mark exam
     * @return number of marks greater than a one mark
     */
    int numberOfMarks(int[] h, int mark){
        return numberOfMarks(h, mark, 0, h.length-1);
    }
    
    int numberOfMarks(int[] h, int mark, int start, int end){
        if (start <= end) {
            int half = (start + end)/2;
            if (v[half] > mark) {
                int i = half -1;
                for (; i < ini; i--)
                    if (v[i] <= mark) break;
                return end + 1 - i +1;
            } else
                return numberOfMarks(h, mark, half+1, end);
        }
        return 0;
    }
    
    int numberOfMarks(int[] h, int mark, int start, int end){
        if (start <= end) {
            int half = (start + end)/2;
            if (v[half] > mark) {
                return 1 + numberOfMarks(h, mark, start, half-1) + numberOfMarks(h, mark, half+1, end);
            } else
                return numberOfMarks(h, mark, half+1, end);
        }
        return 0;
    }
}

@@ -837,392 +837,6 @@
   %7D%0A
-    %0A    int numberOfMarks(int%5B%5D h, int mark, int start, int end)%7B%0A        if (start %3C= end) %7B%0A            int half = (start + end)/2;%0A            if (v%5Bhalf%5D %3E mark) %7B%0A                return 1 + numberOfMarks(h, mark, start, half-1) + numberOfMarks(h, mark, half+1, end);%0A            %7D else%0A                return numberOfMarks(h, mark, half+1, end);%0A        %7D%0A        return 0;%0A    %7D%0A
 %7D%0A

Update CarlosImp.java