3 ms·
In this case depth is not constant, so 1000^depth isn't either. And usually when you encounter O(some constant), it's meant as "of the order of magnitude of",
by yorwba 9y ago
In this case depth is not constant, so 1000^depth isn't either.
And usually when you encounter O(some constant), it's meant as "of the order of magnitude of", i.e. somewhere between some constant/10 and some constant * 10. That isn't the definition used here, but seems to be the cause of most complaints about asymptotic analysis being misapplied when no asymptotic analysis was being done in the first place.
- colanderman 9y agoSee my answer to the GP. `depth` – the lexical nesting depth of "for" loops in the program text – is constant with respect to any given algorithm.