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 n(adsbygoogle = window.adsbygoogle || []).push({}); ^{2}whereas for quick-sort it is nlogn.

nlogn beats n^{2}for all values of n isn't it? Then why?

**Physics Forums - The Fusion of Science and Community**

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

# Why insertion sort works better than quick-sort for small data?

Loading...

Similar Threads - insertion sort works | Date |
---|---|

Python Insert data into excel, calculate+retrieve data using Python | Sep 3, 2017 |

Different Node Deletion/Insertion in a Binary Search Tree | Oct 23, 2016 |

JavaScript Need insert of mathcode in Table element | Sep 22, 2016 |

C++ sort by insertion proplem | Jul 30, 2015 |

How can I insert another program in my program in C. | Apr 28, 2015 |

**Physics Forums - The Fusion of Science and Community**