AlgoGenesis / C

AlgoGenesis is a centralized open-source platform dedicated to providing optimized and well-documented algorithm implementations in C. Perfect for both beginners and advanced users, this repository serves as a comprehensive learning resource for solving algorithmic challenges.
MIT License
90 stars 303 forks source link

[NEW ALGORITHM] Reservoir Sampling Algorithm #1094

Closed anushkaa-dubey closed 1 month ago

anushkaa-dubey commented 1 month ago

Name:

Reservoir Sampling Algorithm

About:

Propose a new algorithm to be added to the repository Reservoir sampling is an algorithm for randomly selecting a subset of k elements from a stream or large dataset of unknown size n. It ensures that every element has an equal probability of being chosen, even if the dataset is enormous or continuously arriving (like a data stream).


Labels:

new algorithm, gssoc-ext, hacktoberfest, level1


Assignees:

pankaj-bind commented 1 month ago

Do not create new issues until your previous one complete, wait until you’re assigned.