Skip to content

Commit 2c81b65

Browse files
authored
Merge pull request #544 from remlostime/insert-sort-swift
[Swift 4] Update Insertion Sort
2 parents 9b72b7f + 5280251 commit 2c81b65

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

Insertion Sort/InsertionSort.playground/Contents.swift

+5
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
//: Playground - noun: a place where people can play
22

3+
// last checked with Xcode 9.0b4
4+
#if swift(>=4.0)
5+
print("Hello, Swift 4!")
6+
#endif
7+
38
func insertionSort<T>(_ array: [T], _ isOrderedBefore: (T, T) -> Bool) -> [T] {
49
var a = array
510
for x in 1..<a.count {

Insertion Sort/InsertionSort.playground/timeline.xctimeline

-6
This file was deleted.

0 commit comments

Comments
 (0)