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
这里为什么不用abs(x - nums[mid]) 和 abs(x - nums[mid + k]), 而是选择用 x - nums[mid] 和 nums[mid + k] - k。 虽然说对于x 在递增数组范围外的情况是可以给到正确答案的,但是有点counter intuitive。希望能有解释。
The text was updated successfully, but these errors were encountered:
Sorry, something went wrong.
No branches or pull requests
这里为什么不用abs(x - nums[mid]) 和 abs(x - nums[mid + k]), 而是选择用 x - nums[mid] 和 nums[mid + k] - k。
虽然说对于x 在递增数组范围外的情况是可以给到正确答案的,但是有点counter intuitive。希望能有解释。
The text was updated successfully, but these errors were encountered: