Can someone explain best and worst case scenarios (complexity) of insertion sort?

后端 未结 0 1330
太阳男子
太阳男子 2020-12-11 05:57

Say we have a list of [1, 2, 3, 4, 5]. How do you calculate the worst or best case scenario?

I thought it was the amount of elements (5) squared, so 25 w

相关标签:
回答
  • 消灭零回复
提交回复
热议问题