Array Unique and Time Complexity
Here's a fast algorithm to make up for Javascript's lack of an Array Unique function.
Array.prototype.unique = function() { var a = {}, z = [], x, i = this.length; do { a[this[i]] = this[i]; if(i === 1){ for(x in a){ if(a.hasOwnProperty(x)){ z.push(a[x]); } } } } while(--i); return z; }











