Unofficial Hacker News companion — get notified on comment replies, and more.

Get a Cable Modem Go to Jail (1999) (opens external site)

240 points by romania1 4 days ago | telecom.csail.mit.edu | 109 comments on HN | Vote on HN (opens Hacker News) |

View full thread · View on Hacker News

Comment thread (2)

  1. You seem to be missing my cheeky "both". Prime numbers by definition only have two factors. If you give me a prime number, no matter how large it is, I'll tell you the same number back and 1, immediately, and I'll be right!

    Or maybe we have very different definition of the runtime of returning an integer? I don't think it makes sense to say that returning an N bit number requires O(log n).

    Replies (1)
    1. And this is exactly the source of the disagreement. For an arbitrary large integer not fitting in a single register, returning it in fresh storage must copy all its bytes. That's why it cannot be O(1).