LinkedIn interview question

Write a function to sample from a non-uniform distribution