Guidewire interview question

one task was to solve BinaryGap