What is the goal of Sieve of Eratosthenes?
Practice this question from Sieve of Eratosthenes - Prime Marking Pattern Practice Quiz, with options and an explanation.
Question
What is the goal of Sieve of Eratosthenes?
Option A — Correct answer
Generate all primes up to n.
Option B
Sort the input and return the middle value
Option C
Use a stack for bracket matching only
Option D
Build a graph adjacency list only
Explanation
Generate all primes up to n.