diff --git a/Selection Sort/SelectionSort.playground/Contents.swift b/Selection Sort/SelectionSort.playground/Contents.swift index b16dadb8d..a552c9edb 100644 --- a/Selection Sort/SelectionSort.playground/Contents.swift +++ b/Selection Sort/SelectionSort.playground/Contents.swift @@ -1,10 +1,5 @@ //: Playground - noun: a place where people can play -// last checked with Xcode 9.0b4 -#if swift(>=4.0) -print("Hello, Swift 4!") -#endif - let list = [ 10, -1, 3, 9, 2, 27, 8, 5, 1, 3, 0, 26 ] selectionSort(list) selectionSort(list, <) diff --git a/Selection Sort/SelectionSort.playground/Sources/SelectionSort.swift b/Selection Sort/SelectionSort.playground/Sources/SelectionSort.swift index e7c66481d..e157319b4 100644 --- a/Selection Sort/SelectionSort.playground/Sources/SelectionSort.swift +++ b/Selection Sort/SelectionSort.playground/Sources/SelectionSort.swift @@ -3,7 +3,7 @@ /// - Parameter array: array of elements that conform to the Comparable protocol /// - Returns: an array in ascending order public func selectionSort(_ array: [T]) -> [T] { - return insertionSort(array, <) + return selectionSort(array, <) } /// Performs the Selection sort algorithm on a array using the provided comparisson method