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
import Foundation | |
let NUM_INTS = 10000 | |
func swiftQuickSort<T : Comparable>(arr : T[], left: Int, right: Int) { | |
if right > left { | |
var i = left | |
for j in (left + 1)..(right + 1) { | |
if arr[j] < arr[left] { | |
i++ |
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
default: app | |
app: c.o s.o | |
swiftc -o app c.o s.o | |
c.o: test.h test.c | |
clang test.c -o c.o -c | |
s.o: test.swift | |
swiftc test.swift -o s.o -c -import-objc-header test.h |