What is a Big O of this recursive function, decreasing by a factor of 5
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);