Problems > The Missing Number > Editorial

The Missing Number — Solution & Editorial

Back to the Problem

The full sum should be N(N+1)/2; subtract what is actually present.

Complexity: O(N)