Javascript Implementation of common data structures and algoritms