This algorithm lets you pick a random sample from a list of unknown size and completes in O(n) time. The original assignment was to take a random sample of x lines from a (streaming) webserver log with at least x lines, without knowing it's length in advance. You MUST take exactly x samples and the likelihood of each line being picked MUST be equal.
-
Notifications
You must be signed in to change notification settings - Fork 0
optroodt/logsample
About
No description, website, or topics provided.
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published