Logo
Coffee.exe has stopped working.
  • 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

Bucket sort Memes

Posts tagged with Bucket sort

Superiority

Algorithms Programming
9 months ago 496.7K views 0 shares
Superiority
When you discover that finding the top K frequent elements can be done in O(n) time using bucket sort or quickselect, and suddenly you're looking down on everyone still using heaps like it's 2010. The party guy in the corner just learned about the O(n log n) heap solution and thinks he's clever, while you're out here flexing your knowledge of linear time algorithms like you just unlocked a secret level in LeetCode. For context: Most people solve this problem with a min-heap (priority queue), which gives O(n log k) complexity. But the galaxy brain move is using bucket sort since frequencies are bounded by n, giving you that sweet O(n) linear time. It's the difference between being invited to the party and owning the party.

Today's picks

Scanfield Under Desk Cable Management Tray, No-Screw, 17-Inch, 2-Pack Black | Clear the Workspace Fast with Super Strong 24-Hour Cure Adhesive, 3.5″ Interior for Power Strips, Chargers and Bundled Cords

Scanfield Under Desk Cable Management Tray, No-Screw, 17-Inch, 2-Pack Black | Clear the Workspace Fast with Super Strong 24-Hour Cure Adhesive, 3.5″ Interior for Power Strips, Chargers and Bundled Cords

Affiliate
$31.95
STOP DOING OPEN SOURCE

STOP DOING OPEN SOURCE

Programming
149.4K views 2 years ago
Reverse financed internship

Reverse financed internship

Programming
125.8K views 3 years ago