Implementation of Datastructures and Algorithms in Javascript