Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Find a good design for Sample #2

Open
flyingmutant opened this issue Jul 28, 2022 · 0 comments
Open

Find a good design for Sample #2

flyingmutant opened this issue Jul 28, 2022 · 0 comments
Labels
enhancement New feature or request

Comments

@flyingmutant
Copy link
Owner

flyingmutant commented Jul 28, 2022

Sample was added in ce7c277, however there are several problematic things:

On the other hand, Sample runs in O(k) for both time and memory. Also, algorithm is simple but non-obvious (a bit like Shuffle), as is the linear-search-instead-of-map optimization.

Also, with #1, Sample may be not required at all.

@flyingmutant flyingmutant added the enhancement New feature or request label Jul 28, 2022
flyingmutant added a commit that referenced this issue Jul 28, 2022
See #2 for details.
@flyingmutant flyingmutant changed the title Find a good desing for Sample Find a good design for Sample Jul 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant