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
Sometimes you need to know how many digits are in an int. You are able to use log10 math to do this.
O(1)
length(integer) :: lambda n: int(math.log10(abs(n))) + 1