Generate N quasi random numbers in less than O(N)
问题 This was inspired by a question at a job interview: how do you efficiently generate N unique random numbers? Their security and distribution/bias don't matter. I proposed a naive way of calling rand() N times and eliminating dupes by trial and error, thus getting inefficient and flawed solution. Then I've read this SO question, these algorithms are great for getting quality unique numbers and they are O(N). But I suspect there are ways to get low-quality unique random numbers for dummy tasks