Compilation of some common data structures representation and sorting algorithms in JavaScript