Written it's O(n). Either way you'll probably be able to get the idea across, which is the most important part. You could also call it linear runtime.
big-omega and big-theta are similar...
Type: Posts; User: helloworld922
Written it's O(n). Either way you'll probably be able to get the idea across, which is the most important part. You could also call it linear runtime.
big-omega and big-theta are similar...
Two things about big-O notation to keep in mind:
1. Any constant coefficients are removed. So O(10000000) -> O(1)
2. You're only interested in the largest term as n approaches infinity, so...