How can anything beat n log n?

(iahmed.me)

17 points | by hazrmard 4 hours ago ago

3 comments

  • mixedmath 3 hours 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}).

    • davidgtl 2 hours ago

      As a sorting tangent: I was very surprised when I first realized that putting 100 known items(received in a random order) in their respective sorted places is O(n) as opposed to n*log(n)

  • 3 hours ago
    [deleted]