• + 3 comments

    This is actually a math problem. Assume t is in the cycle with size 3*2^k, then k = floor(log2(t/3+1)). So, the problem is O(1).