Tapjoy Interview Question: Write a function that randoml... | Glassdoor

Interview Question

Software Engineer - Front End Interview San Francisco, CA

Write a function that randomly selects item from a list

  . This is was just the first phase before you have to build more on top of the question.
Answer

Interview Answer

1 Answer

0

def random_from_list(list)
  list[rand(list.length)]
end

Anonymous on May 6, 2014

Add Answers or Comments

To comment on this, Sign In or Sign Up.