@@ -0,0 +1,500 @@
+/* The isBadVersion API is defined in the parent class VersionControl.%0A      boolean isBadVersion(int version); */%0A%0Apublic class Solution extends VersionControl %7B%0A    public int firstBadVersion(int n) %7B%0A        int lo = 1, hi = n;%0A        int res = n;%0A        %0A        while (lo %3C hi) %7B%0A            int mi = lo + (hi - lo) / 2;%0A            if (!isBadVersion(mi)) %7B%0A                lo = mi + 1; %0A            %7D else %7B%0A                hi = mi;%0A            %7D%0A        %7D%0A        %0A        return lo;%0A    %7D%0A%7D

add no.278