Algorithms and Data structures in Javascript