Header Nodes

Header Node in Header linked list:-
A header linked list is a special type of linked list, which contains a special type of node called header node situated at the very beginning of the list so that in a header linked list will not point to the first node of the list. But start will contain the address of the header node.
There are two types of header linked list i.e. Grounded header linked list & Circular header linked list.

Grounded header linked list:-
It is a header linked list where the last node contains the NULL pointer. LINK [start] = NULL indicates that a grounded header linked list is empty.

Circular header linked list:-
It is a header linked list where the last node points back to the header node. LINK [START] = START is indicated that a circular linked list is empty. A circular header list is frequently used instead of an ordinary linked list because many operations are much easier to implement header lists. This comes from the following two properties, all circular header lists.
The NULL pointer is not used & hence contains a valid address.
Every ordinary node has a predecessor. So the first node may not require a special case.

Post a Comment

0 Comments