Problem 2936 · Medium

Number of Equal Numbers Blocks

Count the runs of equal values in a sorted array you can only query one position at a time. Binary search finds each run boundary.

Open the interactive visualisation