#flashcards/data-structures

Description

Sometimes you need to know how many digits are in an int. You are able to use log10 math to do this.

Runtime

O(1)

Pseudocode

length(integer) :: lambda n: int(math.log10(abs(n))) + 1