Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I can do it in O(1). Give me a large prime number, and I'll tell you both of its factors immediately.
 help



It's O(log n), unless the answer is accepted in a compressed format, with the query assumed to be known. You need to either tell the log n bits explicitly to the one who asks, or refer to them.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: