In a doubly linked list, the number of pointers affected for an insertion…

2017

In a doubly linked list, the number of pointers affected for an insertion operation will be

  1. A.

    5

  2. B.

    0

  3. C.

    1

  4. D.

    None of these

Attempted by 411 students.

Show answer & explanation

Correct answer: D

In a doubly linked list, inserting a new node typically requires updating four pointers. You must update the next and prev pointers of the new node itself, as well as the next pointer of the previous node and the prev pointer of the next node. Therefore, the total number of pointers affected is 4.

A video solution is available for this question — log in and enroll to watch it.

Explore the full course: Isro