Interview Question

Junior Software Developer Interview

-Toronto, ON

FDM Group

If I have an array of size N that contains the numbers between 1-50, what's the most efficient way to find a duplicate?


Interview Answers

2 Answers


Trick is to disregard the size N and focus on the range of 1-50, solution should be O(1).

Anonymous on


Binary search it

Amandeep on

Add Answers or Comments

To comment on this, Sign In or Sign Up.