Skip to content

Instantly share code, notes, and snippets.

### Keybase proof
I hereby claim:
* I am dannordness on github.
* I am nordness (https://keybase.io/nordness) on keybase.
* I have a public key ASDmQxEJO2WaucwcB0vjimGKSJF_NM02w2R0XbqhQIYhbQo
To claim this, I am signing this object:
[
{ "id": 1, "name": "Outlet", "type": "outlet", "on": true},
{ "id": 2, "name": "Cabinet", "type": "lock", "on": false},
{ "id": 3, "name": "Stove", "type": "stove", "on": true}
]
@DanNordness
DanNordness / merge.py
Created October 29, 2014 20:55
Merge Sort - A Python Implementation of Merge Sort
def merge(left, right):
list = []
right_index = 0
left_index = 0
while right_index < len(right) and left_index < len(left):
if right[right_index] <= left[left_index]:
list.append(right[right_index])
right_index += 1
else:
list.append(left[left_index])
@DanNordness
DanNordness / quick.py
Last active August 29, 2015 14:08
Quicksort - A Python Implementation of Quicksort
def quicksort(list):
if len(list) > 1:
pivot = list[random.randrange(0,len(list))]
smaller = []
equal = []
greater = []
for item in list:
if item < pivot:
smaller.append(item)
if item == pivot:
### Keybase proof
I hereby claim:
* I am daniel0524 on github.
* I am daniel0524 (https://keybase.io/daniel0524) on keybase.
* I have a public key whose fingerprint is EDC3 58AD 9A68 70F6 A1D4 37F1 7350 608D D099 2B90
To claim this, I am signing this object: