Data structures and algorithms in Javascript (mostly for practice)