Problem 868 · Easy

Binary Gap

Find the largest distance between two consecutive set bits in the binary form of a number. The visual highlights each 1 bit and measures the gap to its neighbour.

Open the interactive visualisation