Skip to content

Instantly share code, notes, and snippets.

View death667b's full-sized avatar

Ian Daniel death667b

  • Brisbane, Australia
View GitHub Profile
@death667b
death667b / __MAGIKCRAFT__.death667b.package_json.md
Last active July 23, 2017 04:47
Magikcraft API: package_json files, by death667b.
@death667b
death667b / findNumber.js
Last active September 7, 2017 02:15
find a number in range - log n problem
function findNumber(minN, maxN, findMe, opNum = 0) {
// O(log n)
// if inital maxN is ... then there will be ... operations
// 100 ~6 ops
// 1,000 ~9 ops
// 10,000 ~13 ops
// 100,000 ~16 ops
// 100,000,000 ~26 ops
// 100,000,000,000 ~36 ops
// 100,000,000,000,000 ~46 ops
@death667b
death667b / quick_sort.py
Last active November 5, 2017 06:47
Playing with python3 - just a simple quick sort algo. This code has 6 basic operations for 15 numbers in the array.
"""
Quick Sort algo in Python3
"""
def quick_sort(arr):
"""
quick_sort sorts an array of integers.
"""
if len(arr) <= 1:
return arr