Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

People just use whatever their programming language provides. There's a concept of sorting "stability" in which equal elements stay in their original order relative to each other. If stability is important, then usually some variant of merge sort is used. If it's not, then some variant of quick sort is used. If the list, or sublist you're working with is small enough, insertion sort is used.


Consider applying for YC's Winter 2026 batch! Applications are open till Nov 10

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: