Skip to content

Commit 2fcf397

Browse files
authored
Merge pull request #530 from remlostime/merge-sort-swift
[Swift 4] Update Merge Sort
2 parents 27bd589 + a5ca2a8 commit 2fcf397

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

Merge Sort/MergeSort.playground/Contents.swift

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
/* Top-down recursive version */
22

3+
// last checked with Xcode 9.0b4
4+
#if swift(>=4.0)
5+
print("Hello, Swift 4!")
6+
#endif
7+
38
func mergeSort<T: Comparable>(_ array: [T]) -> [T] {
49
guard array.count > 1 else { return array }
510
let middleIndex = array.count / 2

Merge Sort/MergeSort.playground/timeline.xctimeline

Lines changed: 0 additions & 6 deletions
This file was deleted.

0 commit comments

Comments
 (0)