- #1
Avichal
- 295
- 0
I have seen in books that when number of elements is small ~ 30-40 insertion sort is recommended. Why is that? The worst case of insertion sort is n2 whereas for quick-sort it is nlogn.
nlogn beats n2 for all values of n isn't it? Then why?
nlogn beats n2 for all values of n isn't it? Then why?