We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
No description provided.
The text was updated successfully, but these errors were encountered:
const solution = isBadVersion => n => { let [left, right] = [1, n]; // 假设n是第一个错误版本 let res = n; while (left <= right) { const mid = (left + right) >>> 1; if (isBadVersion(mid)) { // 更新res res = mid; // 找下一个可能的 right = mid - 1; } else { left = mid + 1; } } return res; }
Sorry, something went wrong.
No branches or pull requests
No description provided.
The text was updated successfully, but these errors were encountered: