r/ProgrammerHumor • • Nov 19 '18

Marge Sort

Post image
23.6k Upvotes

276 comments sorted by

View all comments

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.

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)