-
Notifications
You must be signed in to change notification settings - Fork 176
New issue
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
找到数组中重复的数字 | HZFE - 剑指前端 Offer #63
Comments
解法二是不是没考虑数组有负数的情况鸭 |
题目里面有指出,数字范围在 0-n-1, n为数组长度,默认都是正数 |
解发一return nums[i];找到第一个就会跳出整个函数的执行了 |
可以不用写continue的 |
说错了,continue还是需要的 |
@Smacricket 里面加一个A数组,把return那行push进去A,while循环外return A就行 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
找到数组中重复的数字 | HZFE - 剑指前端 Offer
题目描述
https://febook.hzfe.org/awesome-interview/book4/array-repeat-number
The text was updated successfully, but these errors were encountered: