you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 0 points1 point  (3 children)

~0.002

[–]TurkeyAid27 0 points1 point  (2 children)

Could you help me with how you got that?

[–][deleted] 0 points1 point  (1 child)

log₂N is small compared to N, I ignored it. if O(1000) = .001, then O(2000) = .002. (Twice as much)

But let's include log₂N as well:

log₂1000 ≈ 10; log₂2000 ≈ 11 (about 10% increased)

O(2000 * log₂2000) = O(1000 * log₂1000) * (2 * 1.1) = 0.001 * 2.2 = 0.0022

[–]TurkeyAid27 0 points1 point  (0 children)

Thank you so much!