how to find leftmost 1-bit in C++ ?
in other word I want to find biggest k so that 2^k <= N for some given number N
for example if N=10 then k=3
I want an O(1) time and memory solution and also without using built-in functions that may not compile in ALL C++ compilers.
thank you in advance.