Write a function that swaps outputs for inputs 1 and 2 (returns 2 for 1, and 1 for 2), and separately find the missing number from an array of size n-1 containing unique numbers from 1 to n.
You've read your 3 free write-ups
Sign up free to keep reading. Your account opens the first 10 questions of every company.