What Are Technical Questions in an Interview? Types With Examples
A technical question in an interview checks whether you can do the work the job requires. A behavioral question, by contrast, checks how you work with people. For software roles, technical questions come in five types: knowledge, coding, system design, debugging, and trade-off questions. Most interview loops use three or four of the five, and the mix depends on the level of the role.
The five types share one property. Each has a correct answer or a defensible one, and the interviewer scores the reasoning that leads to it as much as the result. The sections below give two example questions for each type and say what a good answer contains.
| Type | What it tests | Typical length |
|---|---|---|
| Knowledge | Facts and definitions you should know | 2 to 5 minutes |
| Coding | Writing a working function under time | 20 to 40 minutes |
| System design | Structuring a large system | 45 to 60 minutes |
| Debugging | Finding a fault from symptoms | 10 to 20 minutes |
| Trade-off | Choosing between two valid options | 5 to 10 minutes |
Knowledge questions
Two examples:
- What is the difference between a process and a thread?
- What does an index do in a relational database?
A good answer gives the definition, one contrast, and one consequence. For the first: a process has its own memory space, while a thread shares memory with other threads in the same process. Threads are therefore cheaper to create, but they can corrupt each other's data. Two or three sentences is the right length. A five-minute lecture shows that you cannot tell what matters.
Coding questions
Two examples:
- Find the first non-repeating character in a string.
- Merge two sorted lists into one sorted list.
A good answer states the approach before writing, writes code that runs, and names the time and space complexity. For the first example, count each character in one pass with a dictionary. Then scan the string a second time and return the first character whose count is 1. That is O(n) time and O(k) space, where k is the size of the alphabet. Finally, test it on an empty string and on a string where every character repeats.
System design questions
Two examples:
- Design a URL shortener.
- Design a news feed for 100 million users.
A good answer begins with requirements and numbers: how many writes per second, how many reads, and how long data must be kept. It then names the main parts, an API layer, a database, and a cache, and explains how each handles the load. For the URL shortener, the reasoning about key length matters more than the final diagram. Six characters from a 62-character alphabet give about 57 billion keys, which is enough for most services. What questions are asked in a system design interview? lists the common ones.
Debugging questions
Two examples:
- This endpoint got slow after a deploy. Where do you look first?
- Users report that their sessions end at random. How do you find the cause?
A good answer is a method, not a guess. For the first: compare the deploy diff, then check the latency graph to see whether the slowdown affects every request or only a subset. Then read the database query log for a new query that is missing an index. The interviewer wants to hear you narrow the search with evidence at each step.
Trade-off questions
Two examples:
- SQL or NoSQL for this feature?
- Should this call be synchronous, or should it go through a queue?
A good answer refuses to pick until it has asked about the constraints. It then picks and names the cost. For SQL versus NoSQL: if the feature needs joins and transactions across tables, use SQL. If it needs to store millions of documents with a flexible shape and scale writes across many machines, use a NoSQL store. The cost is weaker consistency, and a good answer says so.
Technical versus behavioral questions
A behavioral question asks about something you did in the past, and it is scored on judgment and communication. "Tell me about a time you disagreed with a teammate" is the standard example. A technical question asks you to do something now, and it is scored on correctness and reasoning. The two are usually asked in separate rounds. A technical interviewer may still end with one behavioral question about the code you just wrote. The full comparison is in What is the difference between technical and behavioral interview questions?. If your question was about the round itself rather than the questions inside it, read What is a technical round in an interview?.
How to answer any technical question
The same five steps work for every type. Restate the question in your own words, so that a misunderstanding is caught early. Clarify the constraints: input size, expected scale, and what happens on error. Think out loud, so the interviewer can credit correct reasoning even if the final answer is incomplete. State the complexity or the trade-off explicitly, because the interviewer will ask if you do not. Verify by testing an example against the code or the design before saying you are done.
How to Prepare
- Build a list of questions for your target role. What Software engineer technical interview questions and answers to prepare? is a good starting list for software engineers.
- Practice coding questions by pattern. Grokking the Coding Interview organizes problems by the technique that solves them, so one pattern covers dozens of questions.
- Learn the design building blocks before doing full designs. Grokking System Design Fundamentals covers caches, queues, and databases at the depth a design answer needs.
- Rehearse the five steps out loud. Explaining your reasoning to an empty room feels strange, but it is the habit that separates a passed interview from a failed one.
- Do one timed mock interview per week. Mock interviews with an engineer who has interviewed at these companies show which of the five types you are weakest on.

GET YOUR FREE
Coding Questions Catalog

$99

$197

$72