Basics-Wrapup

View on GitHub

Simple Linked List

Insertion Operation

Adding a new node in linked list is a more than one step activity. We shall learn this with diagrams here.

Deletion Operation

Deletion is also a more than one step process. We shall learn with pictorial representation.

Reverse Operation

We need to make the last node to be pointed by the head node and reverse the whole linked list.

Operation time Complexity
Traversion O(n)
Insertion at Head O(1)
deletion at head O(1)
Search O(n)
finding Length O(n)
insert at certain key O(n)
delete node of certain key O(n)
update node of a certain key O(n)
reverse a linked list O(n)
Sort by value (bubble Sort) O(n^2)