Binary Gap
Given a positive integer n, find the longest gap between two consecutive 1 bits in its binary representation. The gap is measured as the number of bit positions between them. If fewer than two 1 bits exist, return 0.
Given a positive integer n, find the longest gap between two consecutive 1 bits in its binary representation. The gap is measured as the number of bit positions between them. If fewer than two 1 bits exist, return 0.