Spiceworks Interview Question: Given Ruby code, convert it i... | Glassdoor

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.

Interview Answer

1 Answer


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.