Implementation of various Data Structure using Javascript