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?)
Written by Afshin Mehrabani
Related protips
1 Response
I think Microsoft IE uses BogoSort http://en.wikipedia.org/wiki/Bogosort
over 1 year ago
·
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Sorting
Authors
Did you know?
JavaScript on a page runs with the privileges of that origin. One altered library, tag manager, or snippet can read inputs, change what people see, and call your APIs as the user.
Security insights from Cside
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#