Reputation: 1
I don't know if it is:
or
or
I could be wrong, but I need to be able to compute it to figure it out. I'm real confused here. Please explain the answer and show any calculations too. Thank you.
Upvotes: 0
Views: 393
Reputation: 28921
If the radix base is based on n, such as base = n (5 passes) or ceil(sqrt(n)) (10 passes), time complexity is O(n), since the constants like 5 or 10 are ignored.
If the radix base is independent of n, such as some power of 2, for example 2^8 = 256, then the number of passes = ceil(log256(n^5)), and time complexity is O(n log(n)).
The question doesn't specify what is to be used for the radix base.
Upvotes: 1