Skip to content
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

Open
utterances-bot opened this issue Jan 17, 2022 · 6 comments
Open

找到数组中重复的数字 | HZFE - 剑指前端 Offer #63

utterances-bot opened this issue Jan 17, 2022 · 6 comments
Assignees

Comments

@utterances-bot
Copy link

找到数组中重复的数字 | HZFE - 剑指前端 Offer

题目描述

https://febook.hzfe.org/awesome-interview/book4/array-repeat-number

Copy link

解法二是不是没考虑数组有负数的情况鸭

Copy link

题目里面有指出,数字范围在 0-n-1, n为数组长度,默认都是正数

Copy link

解发一return nums[i];找到第一个就会跳出整个函数的执行了

Copy link

Roxannej commented May 4, 2023

可以不用写continue的

Copy link

Roxannej commented May 4, 2023

说错了,continue还是需要的

Copy link

@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
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants