Einsteinia11 / Data-Structures-and-Algorithm-with-Design-and-Analysis

MIT License
7 stars 21 forks source link

[Add code] : Add code of Sieve of Eratosthenes. #18

Closed pranavjainjs closed 1 year ago

pranavjainjs commented 1 year ago

Hi, I want to add the code for Sieve of Eratosthenes in C++. The sieve is used to preprocess numbers to find the smallest prime divisor. It can also be used to find if a number is prime or not.