Sieve of Eratosthenes
Examples: Input: n = 10Output: 2, 3, 5, 7Input: n = 20Output: 2, 3, 5, 7, 11, 13, 17, 19We have discussed Sieve of Eratosthenes algorithm for the above task. Below is Sieve of Sundaram algorithm. printPrimes(n)[Prints all prime numbers smaller than n]1) In general Sieve of Sundaram, p
WhatsApp: +86 18221755073