Excuse me, that’s MY SPOT!

Every Jack has his Jill.
Every man can expect to have his partner.

Recently, I did some interesting array-related interview questions. The problem description starts like this or similar: Given an array nums containing n numbers in the range [0, n]and asks you to find duplicate/missing numbers.

Here is one of the problem description

Given an array of integers where 1 ≤ a[i] ≤ n (n = size of array), some elements appear twice and others appear once.