0278-first-bad-version/0278-first-bad-version.java
/* The isBadVersion API is defined in the parent class VersionControl.
      boolean isBadVersion(int version); */

public class Solution extends VersionControl {
    public int firstBadVersion(int n) {
        int s = 1;
        int e = n;
        while(s < e){
            int mid = s + (e-s)/2;
            if(isBadVersion(mid) == false){
                s = mid + 1;
            }else{
                e = mid;
            }
        }
        
       return s;
        
    }
}