Software engineer interview questions, and how to answer them
Software engineering interviews have three parts: can you write good code, can you design systems, and are you someone people want to work with? The third is the one engineers prepare for least.
The typical process
| Stage | What it tests |
|---|---|
| Recruiter call | Experience, motivation, salary expectations and logistics |
| Coding test or live coding | Problem solving, data structures and clean, working code |
| Take-home project (some companies) | How you structure, test and document real code |
| System design (mid-level and above) | Designing scalable, reliable systems and reasoning about trade-offs |
| Behavioural interview | Collaboration, ownership, handling incidents and disagreement |
Coding interview questions
- Find two numbers in an array that add up to a target.Start with the simple approach, then improve it with a hash map. Say the time and space complexity.
- Detect whether a linked list has a cycle.Fast and slow pointers. Explain why they must meet.
- Merge overlapping time intervals.Sort by start time, then merge as you go. Check edge cases such as touching intervals.
- How would you test this function?Normal cases, edge cases, invalid input and performance with large input.
Think out loud. Interviewers score your reasoning as much as the answer. Clarify the problem, state an approach, then code it, then test it.
System design questions
- Design a URL shortener.Requirements, generating short IDs, storage, handling heavy read traffic with caching, and analytics.
- Design a notifications service.Queues, retries, user preferences, rate limits and delivery across email, SMS and push.
- How would you scale a service that's getting slow?Measure first, then caching, database indexes, read replicas, horizontal scaling and async work.
A good structure: clarify requirements and scale, sketch a simple design, then go deeper on the parts most likely to break, such as the database or traffic spikes, and talk about trade-offs throughout.
Behavioural questions
- Tell me about a technically challenging project.The problem, your specific contribution, the hard decisions and the outcome.
- Describe a production incident you were involved in.How you responded calmly, fixed it, communicated and prevented it happening again.
- Tell me about a time you disagreed in a code review or design discussion.Evidence over opinion, and how you reached a decision. See our conflict guide.
- How do you balance shipping quickly with code quality?Give a real example of a trade-off and how you managed the technical debt.
- Tell me about a time you helped another engineer grow.Pairing, reviews or mentoring, and the difference it made.
Frequently asked questions
What are the most common software engineer interview questions?
Coding problems using arrays, strings, hash maps, trees and graphs; system design questions for mid-level and senior roles; and behavioural questions about projects, incidents, disagreements and teamwork.
Do UK tech companies do LeetCode-style interviews?
Many do, especially larger tech companies, but plenty of UK employers prefer take-home tasks, pair programming or practical exercises closer to the real job. The recruiter can usually tell you the format.
How should I prepare for behavioural questions as an engineer?
Prepare five or six STAR stories: a hard technical project, an incident, a disagreement, a mistake, mentoring someone and a time you improved something. Practise them out loud.