Closed mmore500 closed 1 year ago
Hi @mmore500 -- thanks for this.
One reason we originally use sets here is to take advantage of the O(1) lookup rather than the O(n) for lists. Now, I cannot remember how important this time savings is here or if I've profiled the code, but I'm glad to see that this potential efficiencyis preserved by the dictionary look-up. Nice work!
Replaces random sampling of a set with random swap-and-pop on a list. Closes #154.