Coding Interview Questions by Topic
Coding interview questions organised by the 22 DSA topics interviews are built from, with the problem count for each topic, the first problem to solve.
On this page
"Coding interview questions" is the most searched phrase in this space and the least useful one to search for. What comes back is either a list of 500 random LeetCode links or a company's leaked question bank from 2019. Neither tells you what to do on Monday. This post organises the 370 problems in DSA Tracker's set by the 22 topics interviews are built from, says how many problems each topic has, and gives you a first problem for each.
The 22 topics, by size
The counts are from the dataset, not estimates. Big topics are big because interviewers keep asking them.
- Dynamic Programming, 51 problems. Start with Climbing Stairs, then Coin Change.
- Graph, 48. Start with Number of Islands.
- Arrays, 34. Start with Two Sum, then Maximum Subarray.
- Binary Trees, 32.
- Strings, 22. Start with Valid Anagram, then Longest Substring Without Repeating Characters.
- BST, 20. Kth Largest Element in BST is the one that separates people who know in-order traversal from people who memorised it.
- Linked List, 17. Reverse Linked List, then Linked List Cycle, then LRU Cache.
- Stack, 16. Valid Parentheses and Min Stack.
- Binary Search, 16. Binary Search itself, then Search in Rotated Sorted Array.
- Greedy, 15.
- Heap, 13. Kth Largest Element in an Array and Top K Frequent Elements.
- Backtracking, 12.
- Bit Manipulation, 11.
- Math, 11.
- Trie, 9.
- Sliding Window, 8.
- Sorting, 7.
- Recursion, 7.
- Matrix, 6.
- Two Pointers, 6. 3Sum is the one everybody gets asked.
- Intervals, 5. Merge Intervals.
- Queue, 4.
Which order to do them in
Not the order above. The order above is by size, and size is not the same as what your interview weights. Three rules that hold for almost every role:
- Arrays, Strings, Two Pointers and Sliding Window first. They are the vocabulary. Most first-round questions are one of these wearing a costume.
- Linked List, Stack, Queue and Binary Search second. Short topics, high frequency, and they teach the pointer discipline that trees and graphs need.
- Trees, Graphs, DP last, and only as deep as your role needs. A backend or SDE loop needs all three. A frontend loop rarely goes past basic tree traversal. A data-engineering loop cares about sorting and hashing far more than DP.
The tracker encodes this per role: pick your role once and the same 370 problems reorder themselves. The role pages show the full order for each one.
How many do you need
Fewer than the list suggests, if you do them properly. A problem counts when you can solve it again two weeks later without looking. That means solving it, writing down why the approach works, and revisiting it. Doing 370 problems once is worth less than doing 120 problems three times.
If you want a number: the 75 problems all three popular sheets agree on is where most people should start. Then extend into the topics your role marks as core.
Answers, not just questions
Every problem page on the tracker carries our own write-up: the intuition, the approaches from brute force to optimal with time and space complexity, and the pitfalls. They are written to be read before your first attempt. If you would rather watch than read, most problems have an animated walkthrough of the algorithm on real input, and the tracer will step through your own code, in Python or JavaScript, in the browser.
Frequently asked questions
What are the most common coding interview questions?
By topic, the biggest buckets in a curated 370-problem set are Dynamic Programming (51 problems), Graph (48), Arrays (34), Binary Trees (32) and Strings (22). By individual problem, Two Sum, Valid Parentheses, Reverse Linked List, Maximum Subarray, 3Sum and Number of Islands recur across every popular sheet.
In what order should I practise coding interview topics?
Arrays, Strings, Two Pointers and Sliding Window first; then Linked List, Stack, Queue and Binary Search; then Trees, Graphs and Dynamic Programming only as deep as your role needs. Frontend loops rarely go past basic tree traversal; backend and SDE loops need all three.
How many coding interview questions should I solve?
Fewer than most lists suggest, if you revise. A problem counts when you can solve it again after two weeks. The 75 problems that Striver, Love Babbar and Apna College all agree on is a realistic core, extended by the topics your role marks as core.
Practice what you just read
Keep reading
Your First 30 DSA Problems: What Order to Solve Them In
Stop solving random problems. Master these 30 DSA questions in a specific order to build the logic patterns required for your coding interviews.
Common Edge Cases in DSA Problems and How to Catch Them
Master coding interviews on DSA Tracker by learning how to catch hidden edge cases like empty inputs, duplicates, and integer overflow before they break your.