Uber interview question

Round 3(1 hr): Reservoir sampling related problem