Logo
Ship my machine, not my code.
  • Home
  • Hot
  • Random
  • Search

Browse

  • AI AI
  • AWS AWS
  • Agile Agile
  • Algorithms Algorithms
  • Android Android
  • Apple Apple
  • Backend Backend
  • Bash Bash
  • C++ C++
  • Cloud Cloud
  • Csharp Csharp
  • All Categories

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
7 hours ago 134.8K 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.

Spotlight

GearScouts.com

Stop scrolling, start exploring! Find the gear that'll get you off the couch and into the wild. Compare power stations for off-grid adventures, flashlights for midnight hikes, and essentials that make the outdoors your playground. Get Outside →

Redragon K585 DITI Wired One-Handed RGB Mechani...

Redragon K585 DITI Wired One-Handed RGB Mechani...
Ad Buy something cool for yourself while secretly funding our battle against undefined behavior. 🛡️