One of the most famous interview question is
One of the famous interview question is:
This is one of the famous interview question of all times.
How do you find the duplicate number on a given integer array?
If you have an array which contains duplicate values and you wish to remove the duplicates - in other words if you want distinct values in your array - then
Set comes to the rescue.