O(log n)

Very very efficient. Most of the time it is base 2 O(8) 3 as an example. less lines for every value.

Example

Example Program

public int reverseLog(int n){
int result = n;
int power = 0;
while (result > 1){
	result /= 2;
	power++;
}
return power;

dependant on which power of 2. for example, if our argument is 69, the program would follow a process like this:

resultpower
691
342
173
84
45
26
17