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

in #programming7 years ago

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.


Please Like and Subscribe for more weekly videos!

Sort:  

Thanks for confirming ownership of your youtube channel!

My pleasure :)

Coin Marketplace

STEEM 0.25
TRX 0.20
JST 0.038
BTC 94129.96
ETH 3496.79
USDT 1.00
SBD 3.78