/BinaryGap

Find longest sequence of zeros in binary representation of an integer.

Primary LanguageKotlin

BinaryGap

Find longest sequence of zeros in binary representation of an integer.

Input / Output

  • 9 -> 2
  • 529 -> 7
  • 20 -> 1
  • 15 -> 0
  • 1041 -> 5
  • 32 -> 0