Problem 2965 · Easy

Find Missing and Repeated Values

Count each value from 1 to n squared; the value counted twice repeats and the value counted zero times is missing.

Open the interactive visualisation