In a doubly linked list, which operation takes O(1) time ?

2026

In a doubly linked list, which operation takes O(1) time ?

  1. A.

    Searching for an element

  2. B.

    Deleting a node when pointer to it is given

  3. C.

    Finding the middle element

  4. D.

    Reversing the list

Attempted by 223 students.

Show answer & explanation

Correct answer: B

In a doubly linked list, deleting a node given its pointer is O(1) time.

Explore the full course: Niacl Ao It Specialist