What is a Big O of this recursive function, decreasing by a factor of 5
06:47 13 Feb 2015

I would need to determine the Big O of this short code:

var iterations = 0;

function operation(num){
    iterations++;
    if (num == 0) return 1;
    return operation(Math.floor((num / 10) * 2));
}

var result = operation(1000);

alert('Result = ' + result + ', number of iterations = ' + iterations);

http://jsfiddle.net/qotbu5pq/2/

javascript algorithm big-o time-complexity