What are the performance benefit of keeping head node with useless data in linkedlist?
I read some implementation of linkedlist operations using head node which keeps only pointer to the first node( data in head node is useless).
But i am unable to figure out even a single benefit of using head node instead of head pointer.
Can someone please clarify with 1 problem and 2 implementations, one with head node and another with head pointer and tradeoff between performance/complexity?
Dummy header nodes are used for these reasons:
Other than that, no, they do not provide any performance/memory advantage.