@@ -0,0 +1,744 @@
+/**%0A * Problem: https://leetcode.com/problems/first-bad-version/ %0A * Binary Search to find the first one which isBadVersion(x) is true.%0A * %0A * Reference: https://www.topcoder.com/community/data-science/data-science-tutorials/binary-search/%0A */%0A %0A/* 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 left = 1;%0A        int right = n;%0A        while(left %3C right) %7B%0A            int mid = left + (right - left) / 2;%0A            if(isBadVersion(mid)) %7B%0A                right = mid;%0A            %7D else %7B%0A                left = mid + 1;%0A            %7D%0A        %7D%0A        return left;%0A    %7D%0A%7D%0A

Create First_Bad_Version.java