GATE CS 2020 · Asymptotic Analysis & Recurrences

MCQ · 1 mark · Problem PROG-DIVC-0176

What is the worst case time complexity of inserting n elements into an empty linked list, if the linked list needs to be maintained in sorted order?
  1. A
    \(\Theta (n)\)
  2. B
    \(\Theta (n \log n)\)
  3. C
    \(\Theta (n^2)\)
  4. D
    \(\Theta (1)\)

Solve it on GATE DA practice →More Searching & Sorting Algorithms problems

Show the worked solutionOfficial GATE Answer Key: Option C.See full step-by-step discussion on GateOverflow: https://gateoverflow.in/333215/gate2020-cs-16

GATE DA practice: past exam problems by chapter, with worked solutions · gatedaprep.com