forked from kodecocodes/swift-algorithm-club
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
9f5e81e
commit 66d0b86
Showing
2 changed files
with
2 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,10 @@ | ||
//: Playground - noun: a place where people can play | ||
|
||
import Cocoa | ||
|
||
// last checked with Xcode 9.0b4 | ||
#if swift(>=4.0) | ||
print("Hello, Swift 4!") | ||
#endif | ||
|
||
// Test Radix Sort with small array of ten values | ||
var array: [Int] = [19, 4242, 2, 9, 912, 101, 55, 67, 89, 32] | ||
radixSort(&array) | ||
|
||
// Test Radix Sort with large array of 1000 random values | ||
var bigArray = [Int](repeating: 0, count: 1000) | ||
var i = 0 | ||
while i < 1000 { | ||
bigArray[i] = Int(arc4random_uniform(1000) + 1) | ||
i += 1 | ||
} | ||
var bigArray = (0..<1000).map { _ in Int.random(in: 1...1000) } | ||
bigArray | ||
radixSort(&bigArray) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters