Set Mismatch Finder
You have an array nums of length n where all integers are in [1, n] and each appears once or twice. Return [duplicate, missing] — the number that appears twice and the number that is missing from the range.
You have an array nums of length n where all integers are in [1, n] and each appears once or twice. Return [duplicate, missing] — the number that appears twice and the number that is missing from the range.