Modular Arithmetic Problems
18 Modular Arithmetic 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 Good Numbers | Medium | 1675 | 52 | General Math |
| 2 | Number of Ways to Divide a Long Corridor | Hard | 1915 | 52 | Combinatorics · Linear Recurrence DP |
| 3 | Find the Divisibility Array of a String | Medium | 1541 | 45 | Prefix Sums |
| 4 | Fancy Sequence | Hard | 2476 | 42 | Prefix Sums · Frequency Counting / Hash Map Lookup |
| 5 | Smallest All-Ones Multiple | Medium | 1593 | 41 | Frequency Counting / Hash Map Lookup |
MORE MATH & GEOMETRY PATTERNS
// your mastery





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