3 ms·
The video stated that on average the number is multiplied by 3/4 on each step. Solve initial_value * (3/4)^x = 1 for x to get the number of steps. That'll g
by AnotherGoodName 5y ago
The video stated that on average the number is multiplied by 3/4 on each step.
Solve
initial_value * (3/4)^x = 1 for x
to get the number of steps.
That'll give a logarithm. So yes it's O(logn) on average