Common algorithms and data structures implemented in JavaScript