Introduction

A Linked List is a linear collection of data elements, called nodes, pointing to the neighbouring node by means of pointer.

Under the simplest form, each node is composed of data and a reference (in other words, a link) to the next node or previous node in the sequence.

⚠️ If you wan’t to learn more about linked-lists click here because in this post I will not cover the theoretical concepts about linked-list. I will just go straight into coding.

Core

The most important part of a linked list is a node. It consist of two things —