diff --git a/docs/notes/pics/11548084848123.gif b/docs/notes/pics/11548084848123.gif new file mode 100644 index 00000000..278e51f5 Binary files /dev/null and b/docs/notes/pics/11548084848123.gif differ diff --git a/docs/notes/剑指 offer 题解.md b/docs/notes/剑指 offer 题解.md index b30c78c4..e63bcb23 100644 --- a/docs/notes/剑指 offer 题解.md +++ b/docs/notes/剑指 offer 题解.md @@ -116,18 +116,8 @@ Output: 以 (2, 3, 1, 0, 2, 5) 为例,遍历到位置 4 时,该位置上的数为 2,但是第 2 个位置上已经有一个 2 的值了,因此可以知道 2 重复: -

+

-```text -position-0 : (2,3,1,0,2,5) // 2 <-> 1 - (1,3,2,0,2,5) // 1 <-> 3 - (3,1,2,0,2,5) // 3 <-> 0 - (0,1,2,3,2,5) // already in position -position-1 : (0,1,2,3,2,5) // already in position -position-2 : (0,1,2,3,2,5) // already in position -position-3 : (0,1,2,3,2,5) // already in position -position-4 : (0,1,2,3,2,5) // nums[i] == nums[nums[i]], exit -``` ```java public boolean duplicate(int[] nums, int length, int[] duplication) {