The CSES Problem Set is a free collection of algorithm problems maintained by Antti Laaksonen of the University of Helsinki, the author of the Competitive Programmer's Handbook. It was built for learning competitive programming, not for interviews, but its first sections are some of the cleanest practice there is for the patterns interviews test. This page explains its size and 18 sections, which parts help with coding interviews and which go far beyond them, how it differs from LeetCode-style lists such as the NeetCode 150 roadmap, which languages to use, and a plan for the interview-relevant core.
What the problem set is
We read the problem list, its introduction and its language page on November 12, 2026.
- Size: 400 problems. CSES added 100 new problems on May 11, 2025, so guides that describe 300 problems are out of date.
- Format: every problem is a full program that reads standard input and writes standard output, with no function signature to fill in. The problems we opened had a 1.00-second time limit and a 512 MB memory limit.
- After solving: you can read other users' solutions and try to break them with a new test case, which is then added and regraded. Since May 2025 some problems also have model solutions behind an Analysis link.
- Cost and licence: free with an account, which you need to submit; the problems are published under Creative Commons BY-NC-SA 4.0.
- Difficulty: there are no labels. The user counters on the list fall from about 192,000 on the first problem to a few hundred on the hardest, and problems generally get harder down each section.
The 18 sections
| Section | Problems | What it covers | Our read for interviews |
|---|---|---|---|
| Introductory Problems | 24 | Loops, recursion, bit strings, Gray code, Tower of Hanoi | High for the first dozen |
| Sorting and Searching | 35 | Two pointers, sweeps, binary search on the answer, prefix sums | Very high |
| Dynamic Programming | 23 | Coins, grid paths, knapsack, edit distance, increasing subsequences; bitmask and digit DP at the end | High for the first 19 |
| Graph Algorithms | 36 | BFS, DFS, Dijkstra, Bellman-Ford, Floyd-Warshall, topological sort, spanning trees; flows and 2-SAT at the end | High for the first 23 |
| Range Queries | 25 | Prefix sums, sparse tables, Fenwick and segment trees | Low beyond the first three |
| Tree Algorithms | 16 | Subtree sizes, diameter, ancestor queries, centroids | Medium for the first five |
| Mathematics | 37 | Modular arithmetic, divisors, combinatorics, probability, game theory | Low, except fast exponentiation |
| String Algorithms | 21 | Tries, pattern matching, palindromes, suffix structures | Medium for the first few |
| Geometry | 16 | Cross products, polygons, convex hull | Rare |
| Advanced Techniques | 25 | Meet in the middle, bitsets, offline methods | Rare |
| Sliding Window Problems | 11 | Window sum, minimum, distinct values, median, cost | High for most |
| Interactive Problems | 6 | Search with limited queries | Low |
| Bitwise Operations | 11 | XOR tricks, XOR bases, subset sums over bits | Medium for the first two |
| Construction Problems | 8 | Building a permutation or grid that meets a rule | Low |
| Advanced Graph Problems | 28 | Prüfer codes, spanning-tree edge checks, girth, isomorphism | Low |
| Counting Problems | 18 | Counting subgrids and structures | Low |
| Additional Problems I and II | 30 each | Mixed, mostly hard | Low |
By our selection, roughly 110 of the 400 problems map directly onto interview patterns. The rest train contest skills, such as segment trees, number theory and flows, that very few interviews ask for.
Problems that match interview patterns
- Sum of Two Values: Two Sum with positions; a hash map or sorting plus two pointers.
- Maximum Subarray Sum: Kadane's algorithm.
- Playlist: the longest run of distinct songs, the same window as Longest Substring Without Repeating Characters.
- Restaurant Customers and Room Allocation: a sweep over start and end times and a min-heap of end times, as in Meeting Rooms II.
- Movie Festival: the most non-overlapping intervals by earliest end, the greedy behind Non-overlapping Intervals.
- Subarray Sums II and Subarray Divisibility: prefix sums with a hash map, as in Subarray Sum Equals K.
- Nearest Smaller Values: a monotonic stack.
- Factory Machines and Array Division: binary search on the answer, as in Koko Eating Bananas and Split Array Largest Sum.
- Minimizing Coins, Coin Combinations II, Edit Distance, Longest Common Subsequence: the classic dynamic programming set.
- Counting Rooms, Labyrinth and Course Schedule: grid flood fill, BFS with path reconstruction and topological order.
- Shortest Routes I: Dijkstra's algorithm.
- Sliding Window Minimum and Sliding Window Median: a monotonic deque and two heaps.
- Tree Diameter, Word Combinations and Exponentiation: diameter by two searches, a trie with dynamic programming, and fast power.
How CSES differs from LeetCode-style lists
| CSES | LeetCode lists | |
|---|---|---|
| What you write | A whole program with input parsing | One function with a given signature |
| Limits | Typically n up to 200,000 in 1 second, so O(n log n) is usually required | Varies; limits are often looser |
| Help | No hints; other users' code only after you solve | Editorials, discussions and videos for most problems |
| Grouping | By technique, with difficulty rising inside each section | By pattern or by company, with difficulty labels |
| Interview fit | Strong on algorithms, silent on communication and design | Built around interview problems |
The two work well together: use a LeetCode list for breadth and interview framing, and CSES for depth in the techniques you keep getting wrong. For a pattern map that ties both together, see our LeetCode patterns for interviews.
Choosing a language on CSES
CSES compiles C++ with g++ 13.3.0 and offers C++11, 17, 20 and 23 modes at -O2, and also runs Java 11.0.30, CPython 3.12.3, PyPy 3.9.18 and Node.js 18.19.1, among others, according to its language page on November 12, 2026.
- C++: the default for most CSES solvers. Add
ios::sync_with_stdio(false); cin.tie(nullptr);for large inputs. - Python: choose PyPy rather than CPython, read all input at once with
sys.stdin.buffer.read().split(), and expect some problems to be out of reach within one second. Solutions that pass on LeetCode can time out here. - Java:
Scanneris slow on 200,000 numbers; useBufferedReaderwith a tokenizer or a byte-level reader. Note the judge's Java 11, which lacks newer features such as records. - JavaScript: Node.js 18 lacks newer array methods such as
toSorted, so stick to older syntax.
A plan for the interview core
This selection of 113 problems is ours, chosen for overlap with interview patterns:
| Weeks | Problems | Count |
|---|---|---|
| 1 | Introductory Problems, the first 12 | 12 |
| 2 and 3 | Sorting and Searching, all of it | 35 |
| 4 and 5 | Dynamic Programming, from Dice Combinations to Projects | 19 |
| 6 and 7 | Graph Algorithms, from Counting Rooms to Road Construction | 23 |
| 8 | Tree Algorithms (first 5), Sliding Window (first 8), Static and Dynamic Range Sum and Static Range Minimum, Word Combinations, String Matching, Longest Palindrome, Counting Bits, Maximum Xor Subarray, Exponentiation, Common Divisors, Hidden Integer | 24 |
At about 14 problems a week, that is 10 to 15 hours for most people with some practice, more in Python. If you are newer to data structures, work through a structured course first, such as the Striver A2Z sheet, and come to CSES for depth.
Turning a list into interview skill
Any list only helps if the practice transfers to problems you have not seen. These habits make the difference:
- Time-box every attempt: about 25 minutes for a medium before you read a solution.
- Keep a log with one line per problem: the pattern, the key idea and the complexity.
- Redo failed problems after three days, a week and three weeks, without looking at your old code.
- Explain your approach out loud before and while you code, as you would to an interviewer.
- In the last two weeks, switch to unseen problems without topic labels.
The patterns most lists are built on are explained in array and string patterns and tree, graph and recursion patterns.
Where CoPilot Interview fits
Finishing a list is not the same as passing an interview: interviewers score how you explain your approach, your trade-offs and your complexity out loud. CoPilot Interview is an AI interview assistant; its free AI mock interview asks coding questions, listens to your spoken explanation and scores it out of ten with a model answer, which is the part a problem list cannot train. The free plan gives 15 minutes a day of live help in sessions of up to 15 minutes, with AI mock interviews included. Online assessments and live coding rounds usually forbid outside help, so practice now and follow your employer's rules on the day.
Disclosure: CoPilot Interview is our product, so weigh what we say about it accordingly.
Frequently asked questions
How many problems are in the CSES Problem Set?
400, in 18 sections, after 100 problems were added on May 11, 2025, according to the CSES site in November 2026.
Is the CSES Problem Set good for coding interviews?
Its first sections are: sorting and searching, dynamic programming, graphs and sliding windows cover most interview patterns. Later sections such as geometry, range queries and advanced graphs go well beyond interviews.
Can I solve CSES problems in Python?
Yes, but choose PyPy, read input in bulk and expect a few problems to be too slow within the one-second limit. C++ is the safest choice for the hardest ones.
Should I do CSES or a LeetCode list?
A LeetCode list first if your interview is soon, because it matches the interview format. Add CSES sections for depth in the techniques you find hardest.
Practice this interview before the real one
The AI mock interview builds questions from your resume and the job description, reads them aloud and scores each spoken answer out of 10. Included on the free plan.
Start a mock interview