Rating is available when the video has been rented.
This feature is not available right now. Please try again later.
Published on Jan 27, 2020
Generating all the numbers in a range is easy – use a for loop! But what if we want the results in random order? Generating an ordered range and using std::shuffle requires O(N) memory as well as doing O(N) work up front. In this talk, I will show how to make use of a simple block crypto to solve this problem. A lazy number generator is implemented with O(1) space usage.