Sorting + Comparison Problems
129 Sorting + Comparison problems on LeetCode, a Arrays & Hashing 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 | Sort an Array | Medium | 1480 | 76 | |
| 2 | Next Permutation | Medium | 1533 | 68 | Opposite-Direction (Converging) |
| 3 | Divide Players Into Teams of Equal Skill | Easy | 1323 | 63 | Opposite-Direction (Converging) · Complement Search (Two Sum Pattern) |
| 4 | Make Lexicographically Smallest Array by Swapping Elements | Hard | 2047 | 63 | Union-Find · Sorting-Based Greedy |
| 5 | Number of Pairs Satisfying Inequality | Hard | 2030 | 62 | Binary Search on Answer Space · Prefix Sums |
MORE ARRAYS & HASHING PATTERNS
// your mastery





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