make a middle node of doubly linklist to the top of the list
Answer Posted / 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 |
Post New Answer View All Answers
How much do coding jobs pay?
What is the full form of india?
Which sort is best for the set: 1 2 3 5 4 a) Quick Sort b) Bubble Sort c) Merge Sort
When does a 'this' pointer get created?
Why do we use string in c++?
What is the difference between prefix and postfix versions of operator++()?
Discussion on error handling of C++ .
Is c++ free?
Differentiate between a template class and class template in c++?
What are single and multiple inheritances in c++?
What is time h in c++?
What is an overflow error?
How do you print a string on the printer?
Why is c++ considered difficult?
Can we use this pointer inside static member function?