Skip to content

Commit b73a14f

Browse files
authored
Update Interview-3.md
1 parent 7e48a01 commit b73a14f

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Algorithm/Interview-3.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,9 @@
1515
3. 如果它和第 m 个数字相等,就找到了一个重复的数字(该数字在下标为 i 和 m 的位置都出现了);
1616
4. 如果它和第 m 个数字不相等,就把第 i 个数字和第 m 个数字交换,把 m 放到属于它的位置。接下来再重复这个比较、交换的过程,直到我们发现一一个重复的数字。
1717

18-
**时间复杂度 O(n),空间复杂度 O(1)**
18+
**时间复杂度 O(n),空间复杂度 O(1),以下代码可提交至:**
19+
20+
[https://leetcode-cn.com/problems/shu-zu-zhong-zhong-fu-de-shu-zi-lcof/](https://leetcode-cn.com/problems/shu-zu-zhong-zhong-fu-de-shu-zi-lcof/)
1921

2022
```python
2123
from typing import List

0 commit comments

Comments
 (0)