Category "integer-arithmetic"

How to calculate integer logarithm of base 3, using fast bit operations?

Calculating of integer logarithm base 2 is pretty easy in near any computer language - you just find the largest '1' in binary representation, and rest becomes

Explanation of test case in the prisoner wall jump program

This would be the general problem statement: A prisoner escapes from the jail by jumping over N walls each with height of each wall given in an array. He can