How can anything beat n log n?

hazrmard 18 points 2 comments November 25, 2026
iahmed.me · View on Hacker News

Discussion Highlights (1 comments)

mixedmath

I'll take this post as an invitation to say other problems with complexity that I, personally, found unexpected. First and closely related to sorting: computing the median (or say the 24th percentile boundary) is Θ(n). This is classic and now I'm used to it, but this really surprised me. Second and close to me as a number theorist: computing the Nth prime can be done in o(N^{3/4}).

Semantic search powered by Rivestack pgvector
4,151 stories · 37,739 chunks indexed