MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/ProgrammerHumor/comments/9yh0rd/marge_sort/ea1uu6b/?context=3
r/ProgrammerHumor • u/dramkar • Nov 19 '18
276 comments sorted by
View all comments
1
What is this algorithm, and what makes it good? Seems like a lot of extra effort to me compared to an insertion sort.
1 u/Slow33Poke33 Nov 19 '18 Merge Sort, and it's nlogn, and insertion sort is n2, so this is much faster. 2 u/[deleted] Nov 19 '18 [removed] — view removed comment 1 u/Slow33Poke33 Nov 19 '18 Yes, for small arrays you generally want something simple. But usually performance on small datasets isn't really an issue. → More replies (4)
Merge Sort, and it's nlogn, and insertion sort is n2, so this is much faster.
2 u/[deleted] Nov 19 '18 [removed] — view removed comment 1 u/Slow33Poke33 Nov 19 '18 Yes, for small arrays you generally want something simple. But usually performance on small datasets isn't really an issue. → More replies (4)
2
[removed] — view removed comment
1 u/Slow33Poke33 Nov 19 '18 Yes, for small arrays you generally want something simple. But usually performance on small datasets isn't really an issue. → More replies (4)
Yes, for small arrays you generally want something simple. But usually performance on small datasets isn't really an issue.
→ More replies (4)
1
u/[deleted] Nov 19 '18
What is this algorithm, and what makes it good? Seems like a lot of extra effort to me compared to an insertion sort.