Implement weighted sampling without replacement | Uber Interview Question