← ALL NOTES
Array

2965. Find Missing and Repeated Values

Given an n×n grid containing numbers from 1 to n², exactly one number a appears twice and exactly one number b is missing. Return [a, b]. Frequency count over all n² numbers: the one with frequency 2…

Loading…