In the last node of a list, the link field often contains a null reference, a special value used to indicate the lack of further nodes. A less common convention is to make it point
Linked List
Singly linked list
In computer science, a linked list is a data structure consisting of a group of nodes which together represent a sequence. Under the simplest form, each node is composed of a datum and a reference
… Read More Find loop in Singly linked list
There are several ways to find loop in singly linked list,
Loop Node5 Next pointer is point to Node3 in Singly Linked List 1 ---- 2 ---- 3 ---- 4 ---- 5 |_____________|
- Hashmap
- Floyd’s
Reversal of LinkedList
Reversal of linked list simplified With Three Pointer Without Recursion