View All num of num See all Photos Amazon.com www.amazon.com Engaged Employer Overview Reviews Salaries Interviews Jobs Photos Benefits 4.5k Reviews 11k Salaries 5.9k Interviews 11k Jobs Follow Add Review or Salary Follow Add Review or Salary Interview Question Quality Assurance Engineer Interview Seattle, WA Amazon.com Given an array of integers, how would you move the duplicate integers into a different array? What is the efficiency of your algorithm? Tags: See more , See less 8 Answer Add Tags Answer Interview Answer 1 Answer ▲ 4 ▼ In Java I'd do this using a hashset and newly created array(of dups). Simply iterate over the array checking first to see if the value already existed in the hashset. If it already exists add to array(of dups) if not add to hashset. Action on Feb 25, 2012 Interviews > Quality Assurance Engineer > Amazon.com Add Answers or Comments To comment on this, Sign In or Sign Up.