Find duplicates in an array of integers within range 0 to n-1