Skip to content
DevFlash

Technical interview

Technical interview questions: examples and explained answers

Cross-cutting questions with opening answers, commentary and directions for follow-up discussion.

  • 6 min read
  • 5 sections
  • Updated November 2, 2026

This guide is under editorial review.

In 1 minute

  • Answer with a decision, an example and the limits of what you know.
  • When investigating bugs, reproduce, compare expected and observed behavior and test one hypothesis at a time.
  • Limit changes to existing code and explain risks, evidence and exclusions.

Technical interview questions become useful practice when you study the reasoning behind an answer instead of memorizing a speech. Questions about projects, decisions and mistakes let you demonstrate how you work even without a coding exercise. Aim to provide facts you can support when the interviewer asks a follow-up, rather than inventing context to sound more experienced.

The answers below are hypothetical examples, not stories to present as your own. Adapt their structure to your experience and notice what each opening leaves to explain. This guide covers questions that apply across technologies; language details belong in the stack guides. If you still need an overview of the stages, start with technical interview preparation, then choose two questions to rehearse aloud.

Technical interview questions about previous projects

Question: tell me about a project you worked on. A possible opening is: “In a study project, I implemented an order lookup screen. I was responsible for loading, data and failure states from a simulated API. I separated data retrieval from presentation so I could test those states.” The answer establishes context, contribution and a decision. It does not begin with a library inventory or claim ownership of an entire team's work.

A follow-up might ask what failed and what changed. Prepare a concrete incident, such as an error message that remained visible after a successful retry. Explain the previous behavior, your investigation and the check you performed afterward. Saying that the project became more organized leaves the effect of the change unclear. Use the front-end interview roadmap to choose interface-specific skills to discuss.

How to answer questions about decisions and alternatives

Question: why did you choose that solution? “I kept the state in the component because only that area needed it. I would consider sharing the state if another part of the screen needed to update it.” This opening provides a concrete condition and an alternative. It is more useful than claiming one tool is best for every project. Add the cost of the choice: which changes stay easy and which would require revisiting the structure?

When the team made the decision, say so. You can explain the constraints you knew and how you implemented your part without claiming authorship. A follow-up is “what would make you reconsider?”. Answer with an observable signal, such as the same rule being duplicated in two places, rather than an arbitrary component count. Your reasoning should connect a need to a decision, not demonstrate loyalty to a technology.

  • Start with the constraint that existed at the time.
  • Explain an alternative that was actually considered.
  • State the accepted cost and the signal that would justify revisiting it.

Questions about bugs and investigation

  1. Present the method

    Question: how do you investigate a bug that only appears sometimes? An opening answer is: “First I try to reproduce it with the same data and actions. Then I compare expected and observed behavior and test one hypothesis at a time.”

  2. Give an example

    This describes a method, but it still needs an example. Explain which hypothesis you rejected and which evidence changed your direction.

  3. Justify the fix

    Editing lines until the screen works does not establish why the fix addresses the cause.

The snippet below accepts an already validated collection of durations. An empty collection has no average and returns null; it does not represent a zero duration. If someone reports an invalid value on screen, this gives you a small hypothesis to test. Explain the rule and inspect the actual input instead of assuming every defect originates in this function. The caller's handling of the result could also be responsible.

export function averageDuration(values: readonly number[]): number | null {
if (values.length === 0) return null;
const total = values.reduce((sum, value) => sum + value, 0);
return total / values.length;
}
A question card flipping over to reveal an answer card with code bars and a lightbulb.
An investigation answer becomes stronger when the method is supported by an example and evidence.

Questions about quality, tests and maintenance

Question: what would you test first? “I would start with the rule that determines whether an operation can proceed and the recovery path when it fails.” Connect that statement to the task. On an order screen, for example, verify that a loading failure allows a retry and that old data is not displayed as the result of a new query. Name the behavior and its consequence before naming a testing tool.

Do

  • When asked how you handle hard-to-maintain code, explain how you limit the change, identify existing behavior and protect the affected path.
  • If the situation involves negotiating with colleagues, the behavioral interview stories using STAR help separate the technical choice from the collaboration it required. Also explain what you deliberately left outside the scope and why.

Avoid

  • Proposing a complete rewrite without understanding deadlines and risk.

How to answer when information is missing

Question: would you cache this screen's data? Before answering, find out what data is displayed, how stale it may become and how updates reach the user. A useful opening is: “If the data can remain stale for an agreed period, I would consider caching. I would need to confirm the freshness requirement.” This moves the discussion forward with an explicit assumption. You do not need to ask every imaginable question before offering an initial direction.

If you do not know an API, separate the concept you understand from the detail you need to look up. You might understand why an operation needs cancellation while needing to verify the method signature. Avoid inventing a name and presenting your guess as a fact. Preserve the same precision in another language; the technical interview in English guide provides ways to clarify questions without memorizing an entire answer.

Frequently asked questions

What questions are asked in a technical interview?

Questions may cover projects, decisions, bugs, tests and a solution's limitations. The selection depends on the role. Prepare experiences you can discuss in depth and confirm whether to expect language questions, an exercise or a project presentation.

How should I explain a project in an interview?

Introduce the problem and your contribution before the stack. Choose one decision, explain the constraint and show how you checked the result. Keep details available for follow-up; you do not need to narrate the repository's entire history.

How do I explain why I chose a technology?

Connect the choice to a real need and mention an alternative. If the technology was already selected, explain that constraint. Describe the benefits and costs you observed without claiming the same choice is ideal in every situation.

What should I say when I do not know a technical answer?

Identify what you do not know, explain what you can infer and propose a way to verify it. Ask for an example if the question is ambiguous. A clearly labeled hypothesis supports discussion; an invented certainty makes correction harder.

Practice with real tests

Solve front-end exercises in the browser, with the same tests a reviewer would run.

See the exercises