yshshrm / Data-Structures-And-Algorithms-Hacktoberfest18

List of data structures and algorithms. Feel free to contribute under Hacktoberfest '18!
204 stars 1.1k forks source link

Added Sieve of Eratosthenes #1655

Open sreenikethMadgula opened 4 years ago

sreenikethMadgula commented 4 years ago

Hello, I am new to open source. I wanted to participate in Hactoberfest this time.

I found this repository, read the contribution guidelines. Further, when I dived into the python algorithms folder, I found that there was no Sieve of Eratosthenes there.

Also, the Sieve of Eratosthenes algorithm wasn't present in the C language folder. So I thought, I'd add a file there too. There is no boolean in C unless the stdbool.h library is used. stdbool cannot be compiled when the file is saved with a ".c" extention. For that reason, there, I used a typedef enum to implement boolean datatype in C.

I think this is a valuable addition to the repository. Thank you.