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
Why c++ is better than c language?
Is it possible for a member function to delete the pointer, named this?
What is void pointer in c++ with example?
Define 'std'.
What is an adaptor class in c++?
What is the best book for c++ beginners?
How can we read/write Structures from/to data files?
What is an undefined reference/unresolved external symbol error and how do I fix it?
Why is standard template library used?
Difference between strdup and strcpy?
What is the disadvantage of using a macro?
How do you show the declaration of a virtual constructor?
Is c++ high level programming language?
How do c++ struct differs from the c++ class?
List the issue that the auto_ptr object handles?