How can anything beat n log n?

(iahmed.me)

11 points | by hazrmard 55 minutes ago

2 comments

  • mixedmath 4 minutes ago
    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}).

  • continuational 5 minutes ago
    Also representing a number is inherently O(log n), so unbounded indexing is at least O(log n) not O(1).