Last Updated: February 09, 2019
· afshinm

Which sorting algorithm Array.sort use?

Because the ECMAscript standard does not specify which sort algorithm is to be used, Array.sort uses these algorithms in different browsers:

Webkit (Safari, ...): Selection Sort

Mozilla/Firefox: Merge Sort

Internet Explorer: ? (I don't have enough knowledge about which algorithm Microsoft IE use for sorting, anybody know that?)

1 Response
Add your response


I think Microsoft IE uses BogoSort

over 1 year ago ·