You're a product manager with versions . One version is bad, and all versions after it are also bad. You have an API isBadVersion(version) that returns whether a version is bad.
Find the first bad version while minimizing API calls. It's the classic lower bound problem in disguise.