make a middle node of doubly linklist to the top of the list
Answer / hussein
middle->prev->next = middle->next;
middle->next->prev = middle->prev;
// Now make the middle as head.
middle->prev = NULL;
middle->next = head;
head->prev = middle;
head = middle;
| Is This Answer Correct ? | 2 Yes | 0 No |
What is the difference between cin.read() and cin.getline()?
What is the maximum combined length of command line arguments including the space between adjacent arguments?
How can an improvement in the quality of software be done by try/catch/throw?
Write down the equivalent pointer expression for referring the same element a[i][j][k][l]?
Is there a new/delete equivalent of realloc?
What is namespace std; and what is consists of?
What are member functions used in c++?
What are the static members and static member functions?
How to declare a pointer to an array of integers?
Is c++ an integer?
What is the difference between stack and heap memory?
What are friend classes?