Implement Reservoir Sampling; Analyze Time and Space Complexity | Amazon Coding Question