Problems > The Missing Term > Editorial

The Missing Term — Solution & Editorial

Back to the Problem

The true difference is (last − first)/M since exactly one term is missing. Scan for the adjacent pair whose gap is 2d and print the midpoint.

Complexity: O(M)