Get Hired · Interviews
Coding interviews
How live coding interviews are run, a think-aloud process that works under pressure, the patterns that come up most, and what interviewers actually score.
A coding interview is less a test of whether you know the answer and more a chance for an engineer to watch how you solve a problem. Two candidates can write the same code and get different results: one explained their thinking, tested their solution and handled a hint well; the other typed in silence and hoped.
This guide covers how coding rounds are run, a step-by-step process to follow every time, and what the interviewer writes on their scorecard.
How coding rounds are run
| Format | What it's like | What to watch for |
|---|---|---|
| Shared online editor | A browser editor, sometimes with the ability to run code | Find out early if you can run code and which language versions are available |
| Shared document | A plain text document with no syntax highlighting or running | Write tidy, indented code; test by walking through it by hand |
| Your own IDE, screen shared | Your machine and tools | Close unrelated windows and notifications; know your shortcuts |
| Pair programming | Work with an engineer on a small realistic task, often in an existing codebase | Ask questions, read the code first, talk about trade-offs as you go |
| Online assessment | Timed problems marked by automated tests, no interviewer | Read every constraint; handle edge cases; check the time remaining |
Most live rounds last 45–60 minutes: a few minutes of introductions, 35–45 minutes on one or two problems, and five minutes for your questions.
A process that works under pressure
Use the same steps every time, so you don't have to think about the process when you're nervous.
1. Clarify the problem (2–4 minutes)
Restate the problem in your own words and ask about anything unclear:
- What are the input sizes? Can the input be empty?
- Can values be negative, duplicated or unsorted?
- What should happen with invalid input?
- Is there a memory or time limit I should aim for?
"So I'm given a list of transactions and need to return the top three customers
by total spend. Can a customer appear many times? Can the list be empty, and
if there are ties, does the order matter?"
2. Work through an example (2–3 minutes)
Write a small example and the expected output. It confirms you understood the question and often reveals the approach.
3. Describe a brute-force solution
Say how you'd solve it simply, and its cost: "I could compare every pair, which is O(n²) time." You may not code it, but it shows you can always produce something that works and gives you a baseline to improve.
4. Optimise, then agree on an approach
Look for the bottleneck. Could a hash map remove a nested loop? Would sorting help? Could two pointers or a sliding window replace recomputation? State the improved complexity and check the interviewer is happy before you write code: "I'll use a hash map from customer to total, then a heap of size three. That's O(n log 3), effectively O(n). Shall I go ahead?"
5. Write the code
- Use clear names; avoid single letters except loop indices.
- Break out small helper functions.
- Keep talking, but in summaries rather than narrating every keystroke: "Now I'll handle the empty case."
- If you get stuck, say what you're stuck on. Interviewers are allowed to give hints, and taking a hint well is a positive signal.
6. Test it
Walk through your code with your example, line by line, tracking variable values. Then try edge cases: empty input, one element, duplicates, very large values. Fix bugs calmly; finding your own bug is good evidence.
7. Discuss complexity and improvements
Finish by stating time and space complexity and anything you'd change with more time, such as input validation or a different data structure for a different usage pattern.
Patterns that come up most
You don't need to memorise hundreds of problems. Most questions are variations of a few dozen patterns:
| Pattern | Typical signal in the question |
|---|---|
| Hash map or set | "Find pairs", "count occurrences", "seen before" |
| Two pointers | Sorted input, "pair that sums to", reversing in place |
| Sliding window | "Longest/shortest substring or subarray with…" |
| Stack | Matching brackets, "next greater element", undo |
| Binary search | Sorted input, "find the minimum value that works" |
| BFS / DFS | Grids, graphs, trees, "shortest path", "connected regions" |
| Heap | "Top k", "k smallest", merging sorted lists, scheduling |
| Intervals | Meetings, overlaps, merging ranges |
| Dynamic programming | "Number of ways", "minimum cost", choices that build on smaller choices |
| Design a class | LRU cache, rate limiter, iterator: test both API and data structure choice |
For infrastructure and cloud roles, expect practical tasks too: parse a log file, write a small script that calls an API with retries, or find the bug in a configuration.
What interviewers score
Scorecards vary, but the same areas appear almost everywhere:
| Area | Strong evidence |
|---|---|
| Problem solving | Clarified the problem, found a good approach, improved it, took hints well |
| Coding | Working, readable code; sensible names and structure; idiomatic use of the language |
| Testing | Tested without being asked; thought of edge cases; found and fixed own bugs |
| Communication | Explained the approach before coding; kept the interviewer informed; asked good questions |
| Complexity | Correct time and space analysis; understood the trade-offs |
A complete, tested, well-explained solution to a medium problem beats a half-finished attempt at a clever optimal one.
Common mistakes
- Coding immediately. Starting before you understand the problem wastes time and signals poor judgement.
- Silence. The interviewer can't give credit for thinking they can't hear.
- Defending a wrong approach. If a hint suggests another direction, take it seriously.
- Skipping tests. Many candidates lose a "yes" because they never ran through their code.
- Rarely used language features. Use the language you know best, and avoid tricks you'd have to explain.
How to practise
- Practise out loud, ideally with a timer and someone listening, or by recording yourself.
- Do problems by pattern: five sliding-window problems in a row teach the pattern better than five random ones.
- Keep a list of mistakes you repeat, such as off-by-one errors, and check for them in every interview.
- In the final week, do a few full mock rounds under real time limits.
Practise
- Coding problems: problems with tests you can run in the browser.
- Algorithms interview questions: complexity, searching, sorting and common techniques.
- Data structures interview questions: arrays, hash maps, trees, graphs and heaps.
General guidance, not legal or immigration advice. Laws and rules change: check the official sources linked in each country note.