Software Engineer
Interview Questions
21 practice questions across 12 skills — each with what the interviewer is really listening for. Prepare with intent, not guesswork.
Free · No signup · Grouped by skill
How to use this page
Don't memorise answers. For each question, read what the interviewer is looking for, then practise answering out loud in your own words with a real example. The notes describe strong answers and common red flags — they are for your prep, not a script.
Data Structures
2 questionsHow would you decide between using a hash map and a balanced binary search tree for a given problem?
IntermediateWhat the interviewer is looking for: A strong answer weighs constant-time average lookups against ordered traversal and worst-case guarantees. Red flags are naming structures without connecting them to access patterns, ordering needs, or memory trade-offs.
Explain the difference between an array and a linked list, and when you would prefer each.
BasicWhat the interviewer is looking for: Look for contiguous memory and O(1) indexing versus cheap insertions/deletions and no random access. A weak answer recites definitions without a concrete situation where one clearly wins.
Algorithms
2 questionsWalk me through how you would find whether a linked list has a cycle, and analyse the time and space complexity.
IntermediateWhat the interviewer is looking for: The candidate should reach the fast/slow pointer approach (O(n) time, O(1) space) and explain why it works. Red flags include only proposing a hash-set solution and being unable to reason about the pointer meeting.
How do you approach estimating the time complexity of a recursive function?
AdvancedWhat the interviewer is looking for: A good answer mentions writing a recurrence relation and reasoning about branching factor and depth, with an example like merge sort. Weak answers guess Big-O from the number of loops without accounting for recursion.
Git
2 questionsYour teammate accidentally committed a secret key to the repository. How do you handle it with Git?
IntermediateWhat the interviewer is looking for: Strong answers combine rotating the exposed key immediately with rewriting history (filter-repo/BFG) and force-pushing, noting that the key must be treated as compromised. A red flag is only deleting the file in a new commit, leaving it in history.
What is the difference between git merge and git rebase, and when would you use each?
BasicWhat the interviewer is looking for: Look for understanding that merge preserves history with a merge commit while rebase produces a linear history by replaying commits, plus the caution against rebasing shared branches. Confusing the two or claiming one is always better is a red flag.
Python
2 questionsIn Python, what is the difference between a shallow copy and a deep copy? When does it matter?
IntermediateWhat the interviewer is looking for: The candidate should explain that a shallow copy shares nested references while a deep copy recurses, and give a mutable-nested-object example. Not knowing the copy module or the mutability implication is a red flag.
Explain how the try/except/finally flow works in Python and how you avoid swallowing errors.
BasicWhat the interviewer is looking for: A strong answer covers catching specific exceptions, using finally for cleanup, and re-raising or logging rather than silently passing. Bare except blocks with no handling should be flagged as a smell.
Java
1 questionIn Java, explain the difference between an interface and an abstract class, and when you would choose one.
IntermediateWhat the interviewer is looking for: Look for multiple-inheritance-of-type via interfaces versus shared state/implementation in abstract classes, and the design intent behind each. A red flag is only reciting syntax without a design rationale.
System Design
2 questionsHow would you design a URL shortener like bit.ly? Walk me through the main components.
AdvancedWhat the interviewer is looking for: Strong candidates cover the encoding scheme, the key-value store, read-heavy scaling with caching, and collision handling, while clarifying scale assumptions first. Jumping straight to code or ignoring read/write ratios is a red flag.
What does it mean for a system to scale horizontally versus vertically, and what are the trade-offs?
IntermediateWhat the interviewer is looking for: Look for adding machines versus adding resources to one machine, plus statelessness, load balancing, and cost/limits. A weak answer defines the terms but cannot discuss when each is appropriate.
SQL
2 questionsWrite a query to find the second-highest salary in an employees table, and explain your approach.
IntermediateWhat the interviewer is looking for: The candidate should handle ties and empty results, using DISTINCT with a subquery or a window function. Red flags include assuming exactly one second value or an approach that breaks with duplicates.
What is a database index, and why can adding one slow down writes?
BasicWhat the interviewer is looking for: A good answer explains that indexes speed reads via an auxiliary structure that must be updated on every write, so they trade write cost and storage for read speed. Not knowing the write penalty is a red flag.
REST APIs
2 questionsHow do you design a REST API endpoint for updating a resource, and why does the HTTP method matter?
IntermediateWhat the interviewer is looking for: Strong answers distinguish PUT (idempotent full replace) from PATCH (partial update), use correct status codes, and consider validation. Treating all writes as POST or ignoring idempotency is a red flag.
What does idempotency mean for an API, and why is it important for retries?
IntermediateWhat the interviewer is looking for: Look for the idea that repeating the same request produces the same result, which makes safe retries possible after timeouts. A candidate who cannot connect idempotency to network failures shows a shallow understanding.
Problem Solving
1 questionDescribe a time you were stuck on a difficult bug. How did you break the problem down?
IntermediateWhat the interviewer is looking for: A strong answer shows a systematic approach — reproducing, isolating variables, forming and testing hypotheses — rather than random changes. Red flags are vague stories with no method or crediting luck.
Collaboration
1 questionYou disagree with a senior engineer's technical approach in a design review. How do you handle it?
IntermediateWhat the interviewer is looking for: Look for evidence-based disagreement, seeking to understand their reasoning, and disagreeing-and-committing once a decision is made. Either steamrolling or staying silent to avoid conflict are both red flags.
Unit Testing
1 questionWhy do you write unit tests, and what makes a test valuable versus noise?
BasicWhat the interviewer is looking for: Strong answers value tests that catch regressions, document behaviour, and are deterministic and focused, while warning against brittle tests coupled to implementation. Chasing coverage percentage as the goal is a red flag.
Code Review
1 questionWhat is the point of a code review, and how do you give feedback that lands well?
BasicWhat the interviewer is looking for: Look for catching defects and sharing knowledge while keeping feedback specific, kind, and focused on the code not the person. A candidate who treats reviews as gatekeeping or nitpicking style over substance is a red flag.
Behavioural & role-general
2 questionsTell me about a project you are proud of. What was your specific contribution?
BasicWhat the interviewer is looking for: Strong answers clearly separate personal contribution from team work, explain technical decisions, and reflect on what they learned. Vague 'we' statements with no ownership or inability to justify choices are red flags.
How do you keep your engineering skills current outside of your day job?
BasicWhat the interviewer is looking for: Look for concrete, recent habits — side projects, reading, open source, courses — and genuine curiosity. Generic claims of 'always learning' with no specifics suggest limited real engagement.