Search
⌘K
Get Premium
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.
All Regions
Comments
Hello Interview Premium
Your account is free and you can post anonymously if you choose.