Spiceworks

  www.spiceworks.com
  www.spiceworks.com

Interview Question

Software Engineer Intern Interview(Student Candidate) Austin, TX

Given Ruby code, convert it into Java or any language that

  you are comfortable with. Ruby code was traversing an array of numbers and removing duplicate elements.
Answer

Interview Answer

1 Answer

0

Java:
Create a set and loop through the array, adding them to the set. Then convert the set back into an array.

Anonymous on Apr 16, 2014

Add Answers or Comments

To comment on this, Sign In or Sign Up.