In theory, this one should be the worst of all.
In practice, it turned out a little bit different:
Create a graph
This was my implementation:
When we analyze these algorithms mathematically, we can conclude that:
- Merge Sort runs in O(n log n) time.
- Both selection and insertion sort run in O(n²) time.
As you can see, this makes a huge difference when amount of data increases.
Geen opmerkingen:
Een reactie posten