@@ -0,0 +1,651 @@
+/* The guess API is defined in the parent class GuessGame.%0A   @param num, your guess%0A   @return -1 if my number is lower, 1 if my number is higher, otherwise return 0%0A      int guess(int num); */%0A%0Apublic class Solution extends GuessGame %7B%0A%0A    public int guessNumber(int n) %7B%0A%0A        int low = 1;%0A        int hight = n;%0A%0A        while (low %3C hight) %7B%0A%0A            int mid = low + (hight - low) / 2;%0A%0A            if (guess(mid) == 0) %7B%0A                return mid;%0A            %7D%0A%0A            if (guess(mid) == 1) %7B%0A                low = mid + 1;%0A            %7D else %7B%0A                hight = mid;%0A            %7D%0A%0A        %7D%0A%0A        return low;%0A%0A    %7D%0A%0A%7D%0A

Create : 374 Guess Number Higher or Lower