Skip to content

Instantly share code, notes, and snippets.

View TheIronDev's full-sized avatar

Tyler Stark TheIronDev

View GitHub Profile
@TheIronDev
TheIronDev / QuicksortArray.js
Created September 25, 2013 02:25
Having some fun with JavaScript. Quicksort implementation for javascript arrays
// Helper Constructor
var RandomArray = function(size) {
size = size || 10;
var tempArray = [];
for(var count=0,max = size;count<max;count++) {
tempArray.push(~~(Math.random()*100));
}
return tempArray;
};
@TheIronDev
TheIronDev / LinkedList.js
Last active December 23, 2015 07:59
Linked List Algorithm tests
var Node = function(value) {
this.value = value;
this.next=null;
return this;
};
var LinkedList = function(node){
this.head = node;
return this;
};
@TheIronDev
TheIronDev / BinarySearchTree.js
Last active December 23, 2015 07:59
BinarySearchTree Test
var Node = function(value) {
this.value = value;
this.left = null;
this.right = null;
return this;
};
Node.prototype.insert = function(newNode) {
if(newNode.value < this.value) {
if(this.left === null) {