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 Janata Bank Assistant Network Engineer 2020 – Written exam, question 27 of 68.

More from this paper