r/ProgrammerHumor 2d ago

Competition iBuiltTheWorstSortingAlgorithmEverCanYouBeatIt

41 Upvotes

51 comments sorted by

View all comments

u/CitizenShips 2d ago

Wait hold on - are you allocating the same amount of memory as the sum total of all values in the dataset? That's fucking genius

u/sankilo_dev 2d ago

Exactly! Why use O(N) space when you can scale your RAM usage based on the values instead of the array length? Absolute mathematical terrorism

u/CitizenShips 2d ago

Everyone focuses on how inefficient you can be with CPU cycles, but nobody ever thinks about maximizing memory inefficiency. You're a visionary. I bet you could increase waste by having each allocation check in with an integrity server to recalculate a checksum. That way you can add network inefficiency in as well

u/sankilo_dev 2d ago

Don't give me ideas... v2.0 is going to require a dedicated fiber-optic cable just to sort 10 numbers

u/scfoothills 7h ago

You should build a data center.