Home » Data Structure & Algorithms » Singly LinkedList

Singly LinkedList


A singly Linked list is a linear data structure where each element is a separate object. Each element or node of a Linked list is comprising of two items – the data and a reference to the next node. The last node has a reference to null. The entry point into a linked list is called the head of the list.


Array Vs Linked List :

Array Linked List
It is of fixed size It is of dynamic size
Extra memory space  is not required for strong address of next node as it is index based. Extra memory space  is required for strong address of next node.
inserting a new element at a specific position is costly,as new space need to be created and each elements need to be moved by 1 position ahead insertion at any position is simpler
Random access is possible using index. Random access is not possible
Supports binary search Does not support binary search
insertion and deletion is not simple insertion and deletion is simple

Problems :

1 : insert.search.delete operation

2 : Length of Linked List

3 : Detect Loop in LinkedList

4 : Frequency of a Number in LinkedList

5 : Find Nth  Node from end of LinkedList

6 : Print middle element of LinkedList

7 : Print reverese  of LinkedList

8 : Reverse a LinkedList  using recurssion

9 : Reverse a LinkedList without recurssion

Leave a comment

Your email address will not be published. Required fields are marked *

seventeen − 3 =