Skip to content

Instantly share code, notes, and snippets.

View cezarywojcik's full-sized avatar

Cezary Wojcik cezarywojcik

View GitHub Profile
@cezarywojcik
cezarywojcik / swiftQuickSort.swift
Last active August 29, 2015 14:02
Swift Quick Sort Test
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++
@cezarywojcik
cezarywojcik / makefile
Created July 7, 2015 09:08
Compiling Swift With C Code
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