logoalt Hacker News

senderista04/22/20251 replyview on HN

How do you efficiently track the "worst element" without something like a max-heap? But yeah, this is a fun algorithm. I think I've seen it before but can't place it, do you remember where you came across it?


Replies

porridgeraisin04/23/2025

  if x > worst then worst = x
show 1 reply