### Is this O(N) algorithm actually O(logN)?

I have an integer, N. I denote f[i] = number of appearances of the digit i in N. Now, I have the following algorithm. FOR i = 0 TO 9 FOR j = 1 TO f[i] k = k*10 + i; My teacher said this is O(N). It seems to me more like a O(logN)…

Details