@@ -0,0 +1,674 @@
+/**%0A * public class VersionControl %7B%0A *     public static boolean isBadVersion(int k);%0A * %7D%0A * you can use VersionControl.isBadVersion(k) to judge wether %0A * the kth code version is bad or not.%0A*/%0Aclass FirstBadVersion %7B%0A    /**%0A     * @param n: An integers.%0A     * @return: An integer which is the first bad version.%0A     */%0A    public int findFirstBadVersion(int n) %7B%0A        int start = 1, end = n;%0A        while (start %3C= end) %7B%0A            int mid = start + (end - start) / 2;%0A            if (VersionControl.isBadVersion(mid)) %7B%0A                end = mid - 1;%0A            %7D else %7B%0A                start = mid + 1;%0A            %7D%0A        %7D%0A        return start;%0A    %7D%0A%7D%0A%0A

Create FirstBadVersion.java