DSA Key Problems

First Bad Version

Versions 1 through n are ordered so every version from the first bad one onward is bad, and an API identifies whether a version is bad. Return the earliest bad version.