Logo
Linux: 27.8 million lines of 'it works, don't touch it'
  • Home
  • Hot
  • Random
  • Search

Browse

  • AI AI
  • AWS AWS
  • Agile Agile
  • Algorithms Algorithms
  • Android Android
  • Apple Apple
  • Azure Azure
  • Backend Backend
  • Bash Bash
  • C++ C++
  • Cloud Cloud
  • All Categories
As an Amazon Associate ProgrammerHumor.io earns from qualifying purchases.

HTTP 418: I'm a teapot

The server identifies as a teapot now and is on a tea break, brb

HTTP 418: I'm a teapot

The server identifies as a teapot now and is on a tea break, brb

Communist-sort Memes

Posts tagged with Communist-sort

Our Sorting Algorithm

Algorithms Javascript Programming
7 months ago 473.4K views 0 shares
Our Sorting Algorithm
Why sort when you can just make everything equal? This "sorting algorithm" calculates the average of all array elements and then replaces every single value with that average. Technically, the array is now sorted (all elements are equal, so they're in order). Technically, you've also destroyed all your data. But hey, O(N) time complexity and O(1) space complexity - can't argue with those metrics. It's the programming equivalent of solving income inequality by giving everyone the exact same salary. Sure, there's no more disparity, but also your billionaire and your intern now make the same amount. Problem solved, comrade.

Today's picks

excovip Python Commands Shortcuts Mouse Pad -90x30x0.2 cm Extended Large Cheat Sheet Mousepad PC Office Spreadsheet Keyboard Mouse Mat Non-Slip Stitched Edge 0402

excovip Python Commands Shortcuts Mouse Pad -90x30x0.2 cm Extended Large Cheat Sheet Mousepad PC Office Spreadsheet Keyboard Mouse Mat Non-Slip Stitched Edge 0402

Affiliate
$13.99
NordVPN

NordVPN

Sponsored
VPN
Adapt. Improvise. Overcome.

Adapt. Improvise. Overcome.

Programming
98.1K views 5 years ago