4th Street Bar Hive-Bar

Hive-Bar Powered by Hive beta-fdb5b5b

Community post

What Happens When You Call sort()? | Introsort Algorithm Explained

There are a dozen sorting algorithms, so which one is actually used when you call sort()?

Every sorting algorithm has its shortcomings.
Because of that, we don’t rely only on one of them but combine two or more together.
A combination of two or more algorithms that solve the same problem is called hybrid algorithm.

Languages such as Java or Python are using Timsort, which is derived from Merge sort and Insertion sort and is designed to perform well on many kinds of real-world data.
C++ standard libraries, Microsoft .Net platform or Swift are using Introsort. Let’s take a closer look at it.
https://www.youtube.com/watch?v=MsvzXTXh0Jg
Please Like and Subscribe for more weekly videos!

13 upvotes $6.88

Replies (2)

Review before signing

Posting as . Signing with . Keychain permission: Posting. Hive Keychain will ask you to approve this action next.


  
Technical details

Operation fingerprint: