Skip to content

Instantly share code, notes, and snippets.

View jozsef-vesza's full-sized avatar
🏡

József Vesza jozsef-vesza

🏡
View GitHub Profile
@jozsef-vesza
jozsef-vesza / InsertionSort.swift
Last active November 4, 2015 20:01
Int -> Generics -> CollectionType
// Original Solution - Excerpt From: Wayne Bishop. “SWIFT ALGORITHMS & DATA STRUCTURES.”
func insertionSort(var numberList: Array<Int>) -> Array<Int> {
var y, key : Int
for x in 0..<numberList.count {
key = numberList[x]
for (y = x; y > -1; y--) {
func someFunction(a: Int, _ b: Int) {
print(a, b)
}
someFunction(1, 2)