A linked list is a linear data structure in which each node
points to another node. Unlike arrays, which have a fixed size, a linked list is a dynamic data structure that can allocate and deallocate memory at runtime.
There are two types of linked lists: singly and doubly-linked
lists. Letβs examine the singly linked list.
SINGLY LINKEDLIST
The linked list data structure is one where each node (element) has a reference or address to the next node i.e each node object stores a data and a link to the next node.
Implementation of a Singly LinkedList
The logic in the following methods i.e deleteNodeByValue, searchNode, getAllNodeData can be found below
Examples
There are different methods one can implement in a LinkedList. Till next time!!
Top comments (0)