Primes / Sieve of Eratosthenes Problems
19 Primes / Sieve of Eratosthenes problems on LeetCode, a Math & Geometry interview pattern, ranked by importance (how often it comes up in real interviews). Difficulty (ELO) and importance shown per problem.
| # | PROBLEM | DIFF | ELO | IMP | PATTERNS |
|---|---|---|---|---|---|
| 1 | Count Primes | Easy | 1253 | 48 | |
| 2 | Minimize Array Sum Using Divisible Replacements | Medium | 1652 | 43 | General Greedy (Greedy is main insight) |
| 3 | Prime Pairs With Target Sum | Medium | 1505 | 42 | Complement Search (Two Sum Pattern) |
| 4 | Closest Prime Numbers in Range | Medium | 1650 | 40 | Sorting + Comparison |
| 5 | Split the Array to Make Coprime Products | Hard | 2159 | 38 | Frequency Counting / Hash Map Lookup · Reachability / Frontier Greedy |
MORE MATH & GEOMETRY PATTERNS
// your mastery





What's your Primes / Sieve of Eratosthenes tier?
leaps.gg syncs your LeetCode history, scores your Primes / Sieve of Eratosthenes mastery, and recommends exactly which problems to do next with spaced repetition. Free to start.
GET MY MASTERY MAP →