Algorithms_in_C 1.0.0
Set of algorithms implemented in C.
Loading...
Searching...
No Matches
prime_sieve.c File Reference

Prime Sieve algorithm implementation. More...

#include <assert.h>
#include <stdio.h>
#include <stdlib.h>
Include dependency graph for prime_sieve.c:

Functions

void prime (int *p)
 Prime Sieve works in O(nlogn) time.
 
int count (int *arr, const int size)
 Count func counts the number of prime numbers.
 
static void test ()
 Test implementations.
 
int main (int argc, const char *argv[])
 Main function.
 

Variables

const unsigned long long MAX_SIZE = 1000000
 for assert for standard input output for general purpose standard library
 

Detailed Description

Prime Sieve algorithm implementation.

Author
Divyansh Kushwaha