Interview specialist interview questions shared by candidates
Given an un-ordered array of integers n, starting at 1 and ending at n, there is one number missing and one number duplicated. Find them.
There is an assumption that the array does not have holes (1,2,3,4,5 vs 1,3,5,6,7,9) judging by the comment that only one number is skipped. But they don't say it outright. They don't give you much paper space, and they expect you to write the code in pencil.
See Interview Questions for Similar Jobs
- Dental Assistant
- Graphic Designer
- Account Executive
- Sales Associate
- Human Resource
- Security Guard
- Social Worker
- Mechanical Engineer