I got asked an interview question that wanted me to discern the Big-O notation of several logarithmic functions. The functions were as follows:
f(x) = log5(x)
f(x) = log(x5)
f(x) = log(6*log x)
f(x) = log(log x)
I was told that the Big-O for the first and second are not equivalent and the third and fourth are not equivalent after mistakenly guessing the opposite. Can anyone explain why they are not equivalent and what their Big-O are then?
So you have O(log log log log log x), O(log x), O(log log x) and O(log log x), three distinct Big-O classes.
If your interviewer said 3 and 4 were different, either he was mistaken or you’ve misremembered the question (happens all the time).