Note that these aren't my algorithsm - they are from a book:
https://www.packtpub.com/application-development/learning-javascript-data-structures-and-algorithms
Learning JavaScript Data Structures and Algorithms Loiane Groner
Rethink JavaScript with this cutting-edge development book, and learn how to use data structures and algorithms to tackle today’s programming challenges