All contents and pictures on this website come from the Internet and are updated regularly every week. They are for personal study and research only, and should not be used for commercial purposes. Thank you for your cooperation.
Given a positive integer N
, find and return the longest distance between
two consecutive 1's in the binary representation of N
.
If there aren't two consecutive 1's, return 0.
Difficulty:
Easy
Lock:
Normal
All contents and pictures on this website come from the Internet and are updated regularly every week. They are for personal study and research only, and should not be used for commercial purposes. Thank you for your cooperation.