End of Year Sale: Use Coupon Code END2025 to Get Extra 25% Off.
left at 1 and right at n.left is less than right, do the following:
a. Calculate the middle of the current search space as mid = left + (right - left) // 2.
b. If isBadVersion(mid) is True, set right to mid.
c. Otherwise, set left to mid + 1.left will be the first bad version.