diff --git "a/342円234円205円 Pattern 02: Two Pointers.md" "b/342円234円205円 Pattern 02: Two Pointers.md" index a2484e8..97c0ced 100644 --- "a/342円234円205円 Pattern 02: Two Pointers.md" +++ "b/342円234円205円 Pattern 02: Two Pointers.md" @@ -158,7 +158,7 @@ function removeElement(arr, key) { } removeElement([3, 2, 3, 6, 3, 10, 9, 3], 3)//4, The first four elements after removing every 'Key' will be [2, 6, 10, 9]. -removeElement([2, 11, 2, 2, 1], 2)//2, The first four elements after removing every 'Key' will be [2, 6, 10, 9]. +removeElement([2, 11, 2, 2, 1], 2)//2, The first two elements after removing every 'Key' will be [11, 1]. ```` - The time complexity of the above algorithm will be `O(N)`, where `N` is the total number of elements in the given array. - The algorithm runs in constant space `O(1)`.

AltStyle によって変換されたページ (->オリジナル) /