{"id":25346422,"url":"https://github.com/shaldonbarnes10/sieve_of_eratostenes_algorithm","last_synced_at":"2025-04-08T17:20:38.573Z","repository":{"id":272178650,"uuid":"915745516","full_name":"Shaldonbarnes10/Sieve_of_eratostenes_Algorithm","owner":"Shaldonbarnes10","description":"Sieve of Eratostenes implementation using c++","archived":false,"fork":false,"pushed_at":"2025-01-12T17:45:38.000Z","size":3,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-14T13:41:56.366Z","etag":null,"topics":["algorithms-and-data-structures","sieve-of-eratosthenes"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Shaldonbarnes10.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-01-12T17:34:01.000Z","updated_at":"2025-01-12T17:45:41.000Z","dependencies_parsed_at":"2025-01-12T18:44:38.391Z","dependency_job_id":null,"html_url":"https://github.com/Shaldonbarnes10/Sieve_of_eratostenes_Algorithm","commit_stats":null,"previous_names":["shaldonbarnes10/sieve_of_eratostenes_algorithm"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Shaldonbarnes10%2FSieve_of_eratostenes_Algorithm","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Shaldonbarnes10%2FSieve_of_eratostenes_Algorithm/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Shaldonbarnes10%2FSieve_of_eratostenes_Algorithm/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Shaldonbarnes10%2FSieve_of_eratostenes_Algorithm/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Shaldonbarnes10","download_url":"https://codeload.github.com/Shaldonbarnes10/Sieve_of_eratostenes_Algorithm/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247888567,"owners_count":21013002,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["algorithms-and-data-structures","sieve-of-eratosthenes"],"created_at":"2025-02-14T13:36:13.559Z","updated_at":"2025-04-08T17:20:38.556Z","avatar_url":"https://github.com/Shaldonbarnes10.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Sieve of Eratosthenes\n\nThis project implements the **Sieve of Eratosthenes**, an efficient algorithm to find all prime numbers up to a given number `n`. The algorithm uses a boolean array to mark multiples of each prime as non-prime, resulting in a list of prime numbers.\n\n---\n\n## Features\n\n- Input a number `n` and find all prime numbers up to `n`.\n- Efficient implementation with a time complexity of \\(O(n \\log \\log n)\\).\n- Handles large input values efficiently.\n\n---\n\n## How It Works\n\n1. **Initialization**:  \n   Create a boolean array (`primes[]`) of size \\(n+1\\) and initialize all elements to `true`.  \n   Set `primes[0]` and `primes[1]` to `false` as 0 and 1 are not prime.\n\n2. **Mark Non-Primes**:  \n   Starting from \\(p = 2\\), mark all multiples of \\(p\\) (from \\(p^2\\) to \\(n\\)) as `false`.\n\n3. **Output Primes**:  \n   Print all indices of the array still marked as `true`.\n\n---\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshaldonbarnes10%2Fsieve_of_eratostenes_algorithm","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fshaldonbarnes10%2Fsieve_of_eratostenes_algorithm","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshaldonbarnes10%2Fsieve_of_eratostenes_algorithm/lists"}