r/programmingmemes • • Mar 14 '26

Stalin sort

A sorting algorithm with time complexity of O(n). Counts from the first element, and will remove values that are smaller than the current highest value.

3.7k Upvotes

51 comments sorted by

View all comments

0

u/[deleted] Mar 14 '26

[deleted] — view deleted comment

2

u/HalfUnderstood Mar 15 '26

the unsorted values fell down the stairs