Leetcode 645. Set Mismatch
Given an array of length n containing numbers from 1 to n where one value was duplicated and another lost, return [duplicate, missing]. Core challenge: detect the repeated and the absent number in linear time and constant/linear extra space using counting, a hash set, or arithmetic/XOR techniques.
Question Timeline
See when this question was last asked and where, including any notes left by other candidates.
0
Hello Interview Premium
Your account is free and you can post anonymously if you choose.