I don't know if it is:
- O(n)
or
- O(5log10(n) * (n+10)) = O(nlog10n)
or
- O(n+k)
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.
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.
Copyright © 2021 Jogjafile Inc.
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.