There are a few questions at SO that basically ask the same thing, but with slight differences:
- Unique (non-repeating) random numbers in O(1)? - the most popular one, yet defines the problem badly (doesn't even introduce letters for uniformity)
- How do you efficiently generate a list of K non-repeating integers between 0 and an upper bound N - defines the problem well, except it doesn't specify if it's combinations or permutations
- Algorithm to select a single, random combination of values? - the tag clearly defines it's about combinations, yet the wording is unclear about it which confuses people
- Efficiently selecting a set of random elements from a linked list - the same task but specifically for linked lists
Due to the intersections, the answers to them are a mess.
- Answers to 1. and 2. basically address the same problem
- Some answers to 1. apply to 3. instead (that's only those I looked into in depth, there may be more)
- Several answers apply to more than one case (and occur in more than one question - or not), but to various degrees and often have deficiencies when done so - which are never specified
Thus, as a source of knowledge on the subject, these questions as a whole are - likewise - a mess
Shall anything be done about this? Maybe:
- move answers around
- merge questions / mark as a duplicate
- improve formulations in the questions to make them sound more distinct
- improve answers to add lacking details / add better copies (if the amount of work is perceived to be close enough to writing one's own answer)
- prominently link to the other questions to encourage those who have a problem better covered by another one to move there
- something else?