What is the worst case time complexity of inserting \(n\) elements into an…

GATE · 2020 · CS · Computer Science & IT

What is the worst case time complexity of inserting nn elements into an empty linked list, if the linked list needs to be maintained in sorted order ?

  1. A.

    θ(n)\theta (n)

  2. B.

    θ(n log n)\theta (n \ log \ n)

  3. C.

    θ(n2)\theta (n^2)

  4. D.

    θ(1)\theta (1)

Attempted by 1264 students.

Sign up free to check your answer

Sign up free

Explore the full course: Gate Guidance By Sanchit Sir

Loading lesson…