GCD / LCM Problems
29 GCD / LCM 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 | Greatest Common Divisor of Strings | Easy | 1398 | 72 | Frequency Counting / Hash Map Lookup |
| 2 | Insert Greatest Common Divisors in Linked List | Easy | 1279 | 62 | Merge Linked Lists |
| 3 | X of a Kind in a Deck of Cards | Easy | 1371 | 48 | Frequency Counting / Hash Map Lookup |
| 4 | Find the Maximum Factor Score of Array | Medium | 1519 | 47 | Prefix Sums |
| 5 | Minimum Number of Operations to Make All Array Elements Equal to 1 | Hard | 1929 | 47 | General Greedy (Greedy is main insight) |
MORE MATH & GEOMETRY PATTERNS
// your mastery





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