The following is an interview question :
Given an array of size N in which every number is between 1 and N, determine if there are any duplicates in it. You are allowed to destroy the array if you like.
Please provide a solution for the above.
Thanks,
H
Start Free Trial