Hey, I dont know the answers to the following questions related to Linked lists in c++. Can you please help me...
1. Why is it sufficient to only have a pointer to the last node of the list?
2. Why would it be cumbersome to maintain an additional pointer to the first node in the list?
3. Advantage of a Doubly Linked list over a single liked list?
4. Advantage of a Single Linked list over a doubly linked list?
1. it's not, you must have the head node.
3.
With Doubly linked list, you can go to the previous node without needing to go all the way from the head.
4. It consumes less memory