Suppose you want to insert n elements into an empty linked list while maintaining the sorted order. What is the worst-case time complexity?

Suppose you want to insert n elements into an empty linked list while maintaining the sorted order. What is the worst-case time complexity?

  1. a) Θ(n)
  2. b) Θ(n log n)
  3. c) Θ(1)
  4. d) Θ(n²)

From the Combined Bank Assistant Programmer (CSE) March 2021 – Preliminary exam, question 27 of 86.

More from this paper