Skip to content

Commit aef1bb7

Browse files
authored
Removes old implementation
1 parent 0d5d8d3 commit aef1bb7

File tree

1 file changed

+0
-12
lines changed

1 file changed

+0
-12
lines changed

Insertion Sort/README.markdown

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -90,18 +90,6 @@ This was a description of the inner loop of the insertion sort algorithm, which
9090
Here is an implementation of insertion sort in Swift:
9191

9292
```swift
93-
func insertionSort(_ array: [Int]) -> [Int] {
94-
var a = array
95-
for x in 1..<a.count { // 2
96-
var y = x
97-
while y > 0 && a[y] < a[y - 1] { // 3
98-
swap(&a[y - 1], &a[y])
99-
y -= 1
100-
}
101-
}
102-
return a
103-
}
104-
10593
func insertionSort(_ array: [Int]) -> [Int] {
10694
var a = array // 1
10795
for x in 1..<a.count { // 2

0 commit comments

Comments
 (0)