From 6203aa97ee8579f37521799b0b65e75edbfbc638 Mon Sep 17 00:00:00 2001 From: Yudong Jin Date: Thu, 23 Nov 2023 14:24:53 +0800 Subject: [PATCH] Apply suggestions from code review Co-authored-by: nuomi1 --- codes/swift/chapter_array_and_linkedlist/array.swift | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/codes/swift/chapter_array_and_linkedlist/array.swift b/codes/swift/chapter_array_and_linkedlist/array.swift index 0a19c9259c..929a0e96f7 100644 --- a/codes/swift/chapter_array_and_linkedlist/array.swift +++ b/codes/swift/chapter_array_and_linkedlist/array.swift @@ -28,7 +28,7 @@ func extend(nums: [Int], enlarge: Int) -> [Int] { /* 在数组的索引 index 处插入元素 num */ func insert(nums: inout [Int], num: Int, index: Int) { // 把索引 index 以及之后的所有元素向后移动一位 - for i in index + 1..