Technical interview questions and how to approach them
Technical interview questions test whether you can do the hands-on work of the job while explaining your thinking: writing and testing code, designing a system, answering questions on the tools and concepts of your field, debugging, and defending a take-home project. Interviewers care about the approach as much as the final answer, so clarify the problem, talk through trade-offs, test your own work and say what you would do with more time.
By Evin JohnPublished 6 min read
What a technical interview is and why employers use it
A technical interview is any round where you show job skills directly rather than describe them. For software engineers that usually means coding and system design. For data roles it means SQL, statistics and modeling. For infrastructure, networking or security roles it means troubleshooting scenarios and architecture questions. Hardware, electrical and mechanical engineering roles have their own versions with calculations, design reviews and fault-finding.
Employers use technical rounds because a résumé line like "built scalable services" says little about how someone actually works. Watching you solve a problem shows how you break it down, how you handle a hint, whether you test your own work and how you explain decisions to a colleague. Those are the habits that predict how you will behave on a real ticket on a busy Tuesday.
| Format | How it usually runs | What is measured |
|---|---|---|
| Online assessment | Timed problems on a testing platform, often auto-graded, taken on your own | Correctness, edge cases and speed on standard problems |
| Technical phone or video screen | One or two problems in a shared editor with an engineer | Fundamentals, communication and basic code quality |
| Live coding round | A harder problem with follow-ups, at a whiteboard or in an editor | Problem solving, choice of data structures, complexity and testing |
| System design | An open prompt such as designing a feed, a chat service or a URL shortener | Requirements, architecture, scaling, trade-offs and failure handling |
| Domain or knowledge round | Questions on the tools, languages and concepts of your field | Depth beyond the buzzwords |
| Debugging or code review | You get broken or messy code and must find the problem or review it | Reading unfamiliar code, reasoning about behavior and giving useful feedback |
| Take-home project | A small project done in your own time, then discussed | Code organization, tests, documentation and the reasoning behind choices |
| Pair programming | You build or fix something with an engineer as a teammate | Collaboration, asking good questions and working in a real codebase |
Coding and problem solving questions
| Question | Why they ask | What a strong answer shows |
|---|---|---|
| Given a list of numbers, return the two that add up to a target. | A warm-up on hashing and complexity | Starting with the brute-force pair check, then improving to one pass with a hash map |
| Find the longest substring without repeated characters. | Sliding window technique | Two pointers and a set or map, with clear handling of the window's left edge |
| Merge a set of overlapping time intervals. | Sorting and careful iteration | Sorting by start time first and handling touching intervals deliberately |
| Check whether a string of brackets is balanced. | Stacks | Pushing openers, matching closers, and handling an empty stack and leftovers |
| Find the shortest path in a grid with obstacles. | Graph search | Breadth-first search, a visited set and a clear reason it finds the shortest path |
| Return the k most frequent items in a list. | Heaps and counting | A frequency map plus a heap or bucket sort, with their complexities compared |
| Implement a least-recently-used cache. | Data structure design | A hash map plus a doubly linked list for constant-time operations |
| Serialize and rebuild a binary tree. | Recursion and tree traversal | A traversal order that preserves structure, including null markers |
| Count the ways to climb stairs taking one or two steps at a time. | Dynamic programming | The recurrence, then memoization or a bottom-up loop with constant space |
| Detect a cycle in a linked list. | Pointer technique | Fast and slow pointers and why they must meet if a cycle exists |
def two_sum(nums, target):
seen = {} # value -> index where we saw it
for i, n in enumerate(nums):
need = target - n
if need in seen:
return seen[need], i
seen[n] = i
return None # say aloud: no pair exists
# Out loud: O(n) time, O(n) space, versus O(n^2) time for checking every pair.
# Test: [3, 3] with target 6 (duplicates), [] (empty), no-solution input.System design and architecture questions
| Question | Why they ask | What a strong answer shows |
|---|---|---|
| Design a URL shortener. | A compact design prompt with scaling questions | Read-heavy traffic, key generation, a cache in front of the store and handling of expired links |
| Design a news feed for a social app. | Fan-out trade-offs | Choosing between building feeds on write or on read, and treating very popular accounts differently |
| Design a chat service. | Real-time systems | Persistent connections, message ordering, delivery receipts and offline users |
| How would you add rate limiting to an API? | Protecting a service | An algorithm such as a token bucket, where it runs and how limits are shared across servers |
| Our database is slow under load. What do you do? | Diagnosis before redesign | Measuring first, then indexing, caching, read replicas and finally partitioning |
| How would you make this service survive a data center outage? | Reliability | Replication across regions, failover, and what consistency you give up |
The system design guides cover the method in depth, and the system design interview framework is a good structure to rehearse: requirements, estimates, a high-level design, a deep dive and trade-offs.
Domain, debugging and take-home questions
| Question | Why they ask | What a strong answer shows |
|---|---|---|
| Explain what happens when you type a web address and press enter. | Breadth across networking, browsers and servers | DNS, TCP and TLS, the HTTP request, server work and rendering, at a depth that fits the role |
| What is the difference between a process and a thread? | Operating system fundamentals | Memory sharing, cost of switching and the risks of shared state |
| When would you choose a relational database over a document store? | Data modeling judgement | Relationships, transactions and query patterns, not brand preference |
| Here is a function that sometimes returns the wrong total. Find the bug. | Debugging method | Reproducing it, forming a hypothesis, testing it and explaining the root cause |
| Review this pull request as if a teammate wrote it. | Code review skills | Correctness first, then readability and tests, with feedback that is kind and specific |
| A deploy just broke production. Walk me through the first fifteen minutes. | Incident response | Stopping the damage, often by rolling back, then communicating and investigating |
| Walk us through your take-home. Why did you structure it this way? | Ownership of your choices | Trade-offs you made under time limits and what you would add next |
| What would you change if this had to handle a hundred times more data? | Scaling an existing solution | Finding the first thing to break and a realistic fix |
| Which tool in your stack do you know best, and what are its weak spots? | Depth over breadth | Limitations you have hit in practice and how you worked around them |
Domain rounds differ most by job. Role-specific guides go further: software engineer, frontend developer, backend developer, data analyst and DevOps engineer.
How to handle the round itself
- Restate and clarifySay the problem back. Ask about input size, edge cases, constraints and what matters most: speed, memory or simplicity.
- Work an example by handWalk a small input through on paper or in comments. It exposes misunderstandings before you write code.
- Say the simple approach firstDescribe a brute-force solution and its cost, then improve. It proves you can deliver something and shows your reasoning.
- Code while narratingExplain choices as you go: why this data structure, why this loop. Silence makes interviewers guess.
- Test your own codeRun your example, then edge cases: empty input, one item, duplicates, very large values. Fix bugs calmly and out loud.
- State complexity and next stepsGive time and space complexity, and say what you would improve with more time.
A fictional technical screen moment
Fictional example
- Interviewer
- Your solution works. Can you make it faster than checking every pair?
- Candidate
- Right now it is quadratic because for each number I scan the rest of the list. The slow part is looking up whether the partner number exists. If I keep a dictionary of numbers I have already seen, that lookup becomes constant time on average, so the whole thing becomes one pass. The cost is extra memory, proportional to the list. Let me rewrite the loop.
- Interviewer
- What if the same number appears twice?
- Candidate
- Good catch. I check for the partner before inserting the current number, so with three and three and a target of six, the second three finds the first one. I will add that as a test case.
The candidate named why the first version was slow, described the fix before writing it, stated the trade-off, and handled a follow-up by reasoning about the order of operations. That is the pattern interviewers hope to see.
Technical interview preparation checklist
- Ask the recruiter which formats you will face and in which language or environment.
- Practice the core patterns: hashing, two pointers, sliding window, stacks, trees, graphs, heaps and dynamic programming.
- Do timed problems in a plain editor without autocomplete, speaking aloud as you go.
- Rehearse two system designs end to end if your level calls for it.
- List the tools on the job description and prepare one real story of using each, including a problem you hit.
- Re-read any take-home you submitted and prepare to defend each decision.
- Prepare a short story about a hard bug you fixed and a design decision you would reverse.
- Set up your camera, microphone and editor for remote rounds, and test screen sharing.
For more on AI tools in prep, read preparing for technical interviews with AI and the overview of AI tools for technical interviews. Technical rounds usually follow a phone screen and often run over a video interview setup.
Practicing technical rounds with Natively
Natively, an AI interview assistant for Mac and Windows, is useful in technical practice in three ways. It can read a practice problem from a screenshot and write an approach and code in its overlay, so you can compare it with your own solution after you finish. It can draw a system design as a diagram when you ask for one. And it transcribes a mock round with a friend, so you can read back where you went quiet for two minutes or skipped testing. With your résumé and the job description added (Pro or the free trial), its answer suggestions in practice draw on your experience and the stack the role lists, and it can draft a follow-up email from the saved notes.
Questions people ask
What questions are asked in a technical interview?
Coding problems on arrays, strings, trees, graphs and dynamic programming, system design prompts such as a chat service or URL shortener, questions on your field's tools and concepts, debugging and code review tasks, and discussion of any take-home.
How do I prepare for a technical interview?
Find out the formats and language, practice core problem patterns on a timer while speaking aloud, rehearse system designs if your level needs them, and prepare stories about real bugs and design decisions.
What if I get stuck in a technical interview?
Say what you are stuck on, return to a small example, and state a simpler approach that works even if it is slow. Interviewers often give hints, and how you use them counts.
Are technical interviews only for software engineers?
No. Data, infrastructure, security, hardware and many engineering roles have technical rounds too, with domain questions, calculations, troubleshooting scenarios or design reviews in place of coding.
Where to go next
Practice with the same assistant you would use on a call: it listens, transcribes and suggests answers from your own resume and the job description.
Facts on this page were last checked on . Product details come from the Natively app itself; if something here is out of date, tell us at hello@heynatively.com.
