COMPUTER SCIENCE AND ENGINEERING
DATA STRUCTURES
Question
[CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
|
How to create very first node in a Doubly Linked List which is initially empty? Assume head pointer variable is L
|
newnode
|
|
newnode
|
|
newnode
|
|
newnode
|
Explanation:
Detailed explanation-1: -Only the first node (head) has its previous node set to null and the last node (tail) has its next pointer set to null. As the doubly linked list contains two pointers i.e. previous and next, we can traverse it into the directions forward and backward.
There is 1 question to complete.