def findFirstBadVersion(self, n):
        """

        :param n: An integers.
        :return: An integer which is the first bad version.
        """
        l = 1
        h = n+1
        while l < h:
            m = (l+h)/2
            if not VersionControl.isBadVersion(m):
                l = m+1
            else:
                h = m

        return l
dataset/ETHPy150Open algorhythms/LintCode/First Bad Version.py/Solution.findFirstBadVersion/original