Problems > Largest Power of Two Within > Editorial

Largest Power of Two Within — Solution & Editorial

Back to the Problem

1 shifted left by (bit length of N minus 1).

Complexity: O(1)