Question: Consider the Node structure as following / * Node of a doubly linked list * / struct Node { int data; Node * next; /
Consider the Node structure as following
Node of a doubly linked list
struct Node
int data;
Node next; Pointer to next node in DLL
Node prev; Pointer to previous node in DLL
;
What will be the code for missing step in C may need two lines of code
Given a reference pointer to pointer to the head of a list and an int, inserts a new node on the front of the list.
void pushNode headref, int newdata
allocate new node
put in the data into new node
Make next of new node as head and previous as NULL
change prev of head node to new node
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
