Consider the following function that takes reference to head of a Doubly Linked List as parameter. Assume

Question:

Consider the following function that takes reference to head of a Doubly Linked List as parameter. Assume that a node of doubly linked list has previous pointer as prev and next pointer as next.

image text in transcribed

Assume that reference of head of following doubly linked list is passed to above function 1 2 3 4 5 6.

What should be the modified linked list after the function call?

A. 2 1 4 3 6 5 

B. 5 4 3 2 1 6.

C. 6 5 4 3 2 1.

D. 6 5 4 3 1 2

Fantastic news! We've Found the answer you've been seeking!

Step by Step Answer:

Related Book For  book-img-for-question
Question Posted: