Y
Hacker News
new
|
ask
|
show
|
jobs
by
gsliepen
206 days ago
You are assuming division itself is an O(1) operation. However, it also scales with the size of the number. So more correct would be to say that this naive method is O(sqrt(N) log(N) log(log(N))).
1 comments
xpe
204 days ago
I was both hoping and fearing that someone would correct my simplification. (That is more nested logs than I would’ve guessed however.)
link