What is the time complexity of the best-case scenario for Insertion Sort?

Practice Questions

1 question
Q1
What is the time complexity of the best-case scenario for Insertion Sort?
  1. O(n log n)
  2. O(n^2)
  3. O(n)
  4. O(log n)

Questions & Step-by-step Solutions

1 item
Q
Q: What is the time complexity of the best-case scenario for Insertion Sort?
Solution: The best-case time complexity for Insertion Sort is O(n) when the array is already sorted.
Steps: 5

Related Questions

Soulshift Feedback ×

On a scale of 0–10, how likely are you to recommend The Soulshift Academy?

Not likely Very likely