You have one billion numbers, implement getRandom() which returns a random number from them. Constaints: 1. No duplicate returning value. 2. getRandom() will at most be invoked 100 million times. Then optimize for space.
Sigiloso
The optimization for space meant: there's not enough space for holding 1 billion integers