Find Missing and Repeated Values
An `n x n` grid contains integers from `1` to `n^2`. Each number should appear exactly once, but one number appears twice while another is missing. Find which number is repeated and which is missing, returning them as `[repeated, missing]`.