Amazon interview question

coding question about weighted random number generator