Sunday, May 23, 2010

Random number from given range

Given a range 0-N, generate 'M' random numbers from the range without any duplication. The space complexity is O(1).

No comments:

Post a Comment