Monday, April 7, 2008

Programming Quiz: Populating stream with unique random numbers

Create a class which populates a stream with k unique random numbers between 0 to max - 1 in an efficient ( No Space vs Speed tradeoff ) manner.

Below are variables and should be the input to the algorithm:
stream: Stream
k: int
max: int

No comments: