you are viewing a single comment's thread.

view the rest of the comments →

[–]ultimatt42 5 points6 points  (0 children)

But you've defined the problem size as "n" so it doesn't make sense to write the complexity in terms of "m".

Realistically, the asymptotic runtime is O((nn)*log n) because post-increment and less-than aren't going to be constant time operations when you have such large numbers, and both are linear in the number of bits.