The size parameter n is the number of numerals in the Dewey decimal notation.

For each numeral, there is one array access, which costs O(1) time.

The number of iterations is just n. Therefore the overall complexity is O(n).