What is the time complexity of insert function in a hash table using a doubly…

2024

What is the time complexity of insert function in a hash table using a doubly linked list?

Answer: A. O(1)Answer: a Explanation: Time complexity of insert function in a hash table is O(1). Condition is that the number of collisions should be low.

  1. A.

    O(1)

  2. B.

    O(n)

  3. C.

    O(log n)

  4. D.

    O(n log n)

Attempted by 344 students.

Show answer & explanation

Correct answer: A

Answer: a

Explanation: Time complexity of insert function in a hash table is O(1). Condition is that the number of collisions should be low.

Explore the full course: Coding For Placement

Loading lesson…