Showing posts with the label algorithm

Linked list implementation using JavaScript

What is a Linked List? Linked list is a linear data structure in which data is stored in non-contiguous memory location. Data in a linked list is wrapped in an object which is commonly called as a node . Each node points (or links) to the next node in the sequence of a list. Unlike arrays, linked lists can easily grow or shrink with addition or removal of data. More detailed information about linked lists can be found here . What will I get from this article? In this article, you will learn about implementing Singly Linked List using JavaScript. Note that, this code is written for learning purpose, so, if you are planning to use this code or a piece of this code in your application, please make sure to have thorough testing in place. Implementation We will be executing our code using NodeJS, make sure it is installed in your system. We will have three files in our project directory. list-node.js – class repre