18 role-specific questions
Software Engineer Interview Questions & Answers
General software engineering interviews test problem solving, data structures and complexity, code quality, debugging, testing judgement and — at mid-level and above — system design.
Free, no sign-up. 97 questions in this role's practice pool, including behavioural, HR and situational questions.
Software engineering fundamentals interview questions
Data structures, complexity, design principles, Git, code review, testing and debugging — asked in almost every developer interview.
1.
What is Big O notation? Give examples of common complexities.
BeginnerTechnicalPractise this question and get feedbackWhat the interviewer is evaluating
Ability to reason about efficiency.
Key points a strong answer covers
- Growth with input size. Big O describes how time or memory grows as input grows (usually worst case).
- O(1) / O(log n). O(1): hash lookup; O(log n): binary search.
- O(n) / O(n log n). O(n): one pass; O(n log n): efficient sorting.
- O(n²). O(n²): nested loops over the input.
- Space complexity. Space complexity matters too.
Suggested answer structure
- Define it in one sentence.
- Explain how it works underneath.
- Give a practical example from code or a project.
- Close with a trade-off, pitfall or when you'd use it.
Common mistakes
- Confusing Big O with actual running time.
- Ignoring space complexity.
Likely follow-up questions
- What's the complexity of checking for duplicates with a nested loop vs a set?
- Why can an O(n²) algorithm be fine sometimes?
Example strong answer
Big O describes how an algorithm's running time or memory grows as the input grows, ignoring constants — usually the worst case. O(1) is constant, like a hash map lookup. O(log n) halves the problem each step, like binary search on a sorted array. O(n) touches each item once, like finding the maximum. O(n log n) is efficient comparison sorting. O(n²) usually means nested loops — checking every pair for duplicates — and it explodes with large inputs, whereas putting items in a set makes duplicate detection O(n) with O(n) extra space. It's about growth, not exact speed, so for ten items an O(n²) loop can be perfectly fine.
2.
Explain the SOLID principles with examples.
IntermediateTechnicalPractise this question and get feedbackWhat the interviewer is evaluating
Design principles applied, not memorised.
Key points a strong answer covers
- Single responsibility. A class should have one reason to change.
- Open/closed. Open for extension, closed for modification.
- Liskov substitution. Subtypes must be usable wherever the base type is.
- Interface segregation. Prefer small, focused interfaces.
- Dependency inversion. Depend on abstractions, not concrete implementations.
Suggested answer structure
- Define it in one sentence.
- Explain how it works underneath.
- Give a practical example from code or a project.
- Close with a trade-off, pitfall or when you'd use it.
Common mistakes
- Reciting definitions with no example.
- Applying them dogmatically to tiny code.
Likely follow-up questions
- Give an example of a Liskov violation.
- Can following SOLID make code worse?
Example strong answer
Single responsibility: a class has one reason to change — an
InvoiceServicecalculates invoices, while PDF generation and emailing live elsewhere. Open/closed: add behaviour by extension rather than editing working code — a new payment method implements aPaymentProviderinterface instead of adding another branch to a switch. Liskov substitution: subtypes must work wherever the parent is expected; the classic violation is aSquarethat breaksRectangle's setters. Interface segregation: small, focused interfaces, so a read-only report doesn't depend on write methods. Dependency inversion: high-level code depends on abstractions — the service takes anOrderRepositoryinterface, so tests can pass a fake. They're guidelines; over-applied to small code they add needless layers.3.
Explain your Git workflow. What's the difference between merge and rebase?
BeginnerTechnicalPractise this question and get feedbackWhat the interviewer is evaluating
Collaboration hygiene.
Key points a strong answer covers
- Branching workflow. Short-lived feature branches merged via pull requests (or trunk-based).
- Merge. Merge combines branches with a merge commit, preserving history as it happened.
- Rebase. Rebase replays commits on top of another branch, giving linear history.
- Don't rewrite shared history. Don't rebase commits others have based work on.
- Good commits. Small, well-described commits; squash where it helps.
Suggested answer structure
- Define it in one sentence.
- Explain how it works underneath.
- Give a practical example from code or a project.
- Close with a trade-off, pitfall or when you'd use it.
Common mistakes
- Rebasing a shared branch and force-pushing.
- Huge long-lived branches.
Likely follow-up questions
- How do you resolve a merge conflict?
- What does
git bisectdo?
Example strong answer
I work on short-lived feature branches off
main, keep commits small with clear messages, and open a pull request early for review; CI must pass before merging. Many teams I've worked with are close to trunk-based development, with feature flags for unfinished work. Merge combines two branches with a merge commit and preserves history exactly as it happened. Rebase replays my commits on top of the latestmain, giving a clean linear history and letting me resolve conflicts commit by commit. The rule is not to rebase commits others have already pulled, because it rewrites history — on my own feature branch it's fine, with--force-with-lease.git bisectis great for finding which commit introduced a bug.4.
What do you look for in a code review, and how do you give feedback?
IntermediateTechnicalPractise this question and get feedbackWhat the interviewer is evaluating
Teamwork and engineering standards.
Key points a strong answer covers
- Correctness & tests. Correctness, edge cases and tests.
- Design & readability. Design, readability and maintainability.
- Security & performance. Security and performance risks.
- Kind, specific feedback. Specific, kind feedback explaining why; label nits.
- Automate the trivial. Leave formatting to linters.
Suggested answer structure
- Define it in one sentence.
- Explain how it works underneath.
- Give a practical example from code or a project.
- Close with a trade-off, pitfall or when you'd use it.
Common mistakes
- Nitpicking formatting that a linter should handle.
- Approving without reading the tests.
Likely follow-up questions
- How do you handle a disagreement in a review?
- How big should a pull request be?
Example strong answer
First, does it do what the ticket asks and is it correct — edge cases, error handling, and tests that would actually fail if the logic broke. Then design and readability: is it as simple as it can be, are names clear, does it fit the existing patterns, will the next person understand it? I look for security issues like unvalidated input or leaked secrets, and performance traps like N+1 queries. Formatting I leave to linters. My feedback is specific and explains why, phrased as suggestions or questions — 'what happens if the list is empty?' — and I label minor points as nits so the author knows what's blocking. I also call out things done well, and I prefer small pull requests.
5.
Walk me through how you debug a problem you've never seen before.
IntermediateProblem solvingPractise this question and get feedbackWhat the interviewer is evaluating
Systematic problem solving.
Key points a strong answer covers
- Reproduce. Reproduce it reliably.
- Gather evidence. Read the error, logs and data.
- Narrow down. Narrow it down — bisect commits, isolate components, minimal reproduction.
- Hypothesis & test. Form a hypothesis and test it, one change at a time.
- Fix & prevent. Fix the root cause and add a regression test.
Suggested answer structure
- Restate the problem and your assumptions.
- Break it into steps and reason out loud.
- Check your answer against an edge case.
- Summarise the result and what you'd verify next.
Common mistakes
- Changing several things at once.
- Guessing without reading the error.
Likely follow-up questions
- How do you debug something that only happens in production?
- When would you ask for help?
Example strong answer
First I reproduce it reliably — if I can't, I collect more data until I can. Then I read the evidence properly: the full error message and stack trace, logs around the time, any metrics or recent changes. I narrow it down by halving the search space —
git bisectto find the commit that introduced it, or cutting the code path until I have a minimal reproduction. I form a hypothesis, test it with one change at a time — a breakpoint, a log line, a failing test — and update my understanding based on what I see. Once I find the root cause, not just the symptom, I fix it, add a regression test, and if I've been stuck for a while I ask a teammate, because explaining it often reveals the answer.6.
How do you decide what to test and how much?
IntermediateTechnicalPractise this question and get feedbackWhat the interviewer is evaluating
Pragmatic quality judgement.
Key points a strong answer covers
- Risk-based. Test the riskiest and most important logic most thoroughly.
- Test pyramid / trophy. Balance unit, integration and a few end-to-end tests.
- Behaviour not implementation. Test behaviour, so refactoring doesn't break tests.
- Coverage isn't the goal. Coverage is a guide, not the target.
- Fast & in CI. Fast, reliable tests running in CI.
Suggested answer structure
- Define it in one sentence.
- Explain how it works underneath.
- Give a practical example from code or a project.
- Close with a trade-off, pitfall or when you'd use it.
Common mistakes
- Chasing 100% coverage.
- Tests coupled to implementation details.
Likely follow-up questions
- What would you test in a payment calculation?
- When is test-driven development worth it?
Example strong answer
I think in terms of risk: what would hurt most if it broke, and what's most likely to break. Money calculations, permissions and complex business rules get thorough unit tests with edge cases. Most other confidence comes from integration tests that exercise real pieces together — an API endpoint with a real database — plus a few end-to-end tests for critical journeys like checkout. I test behaviour through public interfaces rather than internals, so refactoring doesn't break tests. Coverage is a useful signal for finding untested areas, not a target. And tests must be fast and reliable in CI, otherwise people stop trusting them. I use TDD where logic is tricky and well-defined.
7.
How does a hash map work internally?
IntermediateTechnicalPractise this question and get feedbackWhat the interviewer is evaluating
Data structure fundamentals.
Key points a strong answer covers
- Hash function → bucket. A hash function maps a key to a bucket index in an array.
- Collisions. Collisions are handled by chaining or open addressing.
- Load factor & resizing. When the load factor passes a threshold, the table resizes and rehashes.
- Complexity. O(1) average lookups; O(n) worst case with many collisions.
Suggested answer structure
- Define it in one sentence.
- Explain how it works underneath.
- Give a practical example from code or a project.
- Close with a trade-off, pitfall or when you'd use it.
Common mistakes
- Saying lookups are always O(1).
- Not mentioning collisions.
Likely follow-up questions
- Why must keys be immutable (or at least their hash)?
- What makes a good hash function?
Example strong answer
A hash map stores entries in an array of buckets. To insert or find a key, it runs the key through a hash function and maps the result to a bucket index, so it can jump straight there. Different keys can land in the same bucket — a collision — handled either by chaining, keeping a small list or tree of entries in each bucket, or by open addressing, probing for the next free slot. When the map gets too full — the load factor passes a threshold like 0.75 — it allocates a bigger array and rehashes everything. That gives O(1) average lookups, but with a poor hash function or many collisions it degrades towards O(n). Keys shouldn't change after insertion, or their bucket becomes wrong.
8.
Which design patterns do you use most, and where?
IntermediateTechnicalPractise this question and get feedbackWhat the interviewer is evaluating
Practical pattern knowledge, not a textbook list.
Key points a strong answer covers
- Strategy. Strategy: swap algorithms behind an interface (e.g. payment providers).
- Factory. Factory: centralise object creation.
- Observer / pub-sub. Observer: notify subscribers of events.
- Adapter / decorator. Adapter wraps a third-party API; decorator/middleware adds behaviour.
- Real example. Tie each to a real example.
Suggested answer structure
- Define it in one sentence.
- Explain how it works underneath.
- Give a practical example from code or a project.
- Close with a trade-off, pitfall or when you'd use it.
Common mistakes
- Listing patterns with no real use.
- Using patterns for their own sake.
Likely follow-up questions
- When does a pattern become over-engineering?
- How does dependency injection relate to the strategy pattern?
Example strong answer
The ones I use most are fairly lightweight. Strategy: different algorithms behind one interface — for example tax rules per country, or several payment providers chosen at runtime — which removes long if/else chains. Adapter: wrapping a third-party SDK behind our own interface, so swapping providers or faking it in tests is easy. Observer, or pub-sub: domain events like 'order placed' that several parts of the system react to. Decorator, which is essentially how middleware works — adding logging, caching or retries around a call. And factories when creating an object needs logic. I only introduce a pattern when it solves a real problem; otherwise a plain function is better.
9.
How do you deal with technical debt?
IntermediateTechnicalPractise this question and get feedbackWhat the interviewer is evaluating
Balancing delivery and code health.
Key points a strong answer covers
- What it is. Technical debt is the future cost of shortcuts; it accrues 'interest' by slowing work.
- Make it visible. Track and make it visible.
- Prioritise by impact. Prioritise debt in code that changes often or causes incidents.
- Pay down continuously. Pay it down continuously alongside features, in small refactors.
- Communicate value. Explain the business cost to stakeholders.
Suggested answer structure
- Define it in one sentence.
- Explain how it works underneath.
- Give a practical example from code or a project.
- Close with a trade-off, pitfall or when you'd use it.
Common mistakes
- Asking for a big rewrite.
- Ignoring it until delivery grinds to a halt.
Likely follow-up questions
- How would you convince a product manager to spend time on refactoring?
- When is a rewrite justified?
Example strong answer
Technical debt is the future cost of shortcuts — some deliberate and reasonable, some accidental. Not all debt needs paying, so I prioritise by impact: debt in code that changes often, causes incidents or slows down every feature matters; ugly code nobody touches can wait. I make it visible as tickets with the concrete cost — 'adding a payment method takes two weeks instead of two days because of X' — which is how I get product managers on board. Then I pay it down continuously: refactoring the area I'm already working in, and reserving a slice of each sprint for the biggest items, rather than asking for a big-bang rewrite, which is rarely justified.
10.
How do you estimate how long a piece of work will take?
IntermediateProblem solvingPractise this question and get feedbackWhat the interviewer is evaluating
Planning maturity and honesty.
Key points a strong answer covers
- Break it down. Break the work into small tasks.
- Unknowns & risks. Identify unknowns; spike to reduce them.
- Ranges / relative. Give ranges or relative sizes, not false precision.
- Include everything. Include testing, review and deployment.
- Communicate & update. Update estimates and flag risks early.
Suggested answer structure
- Restate the problem and your assumptions.
- Break it into steps and reason out loud.
- Check your answer against an edge case.
- Summarise the result and what you'd verify next.
Common mistakes
- Giving a single confident number for uncertain work.
- Estimating only the coding time.
Likely follow-up questions
- What do you do when you realise halfway through you'll miss the estimate?
- How do you estimate something you've never done?
Example strong answer
I break the work into tasks small enough to estimate — ideally a day or two each — and list the assumptions and unknowns. Where there's a big unknown, like an unfamiliar API, I suggest a short time-boxed spike first. I include everything, not just coding: tests, code review, deployment, documentation and coordination. Then I give a range with a confidence level — 'three to five days, mostly depending on the payment provider's sandbox' — rather than false precision, or relative sizes if the team uses story points. As soon as I learn something that changes the estimate, I say so, so the plan can be adjusted early rather than surprising anyone at the deadline.
System design interview questions
Classic design problems — URL shorteners, feeds, chat, bookings, rate limiters — and how to structure your answer.
1.
Design a URL shortener like bit.ly.
IntermediateSystem designPractise this question and get feedbackWhat the interviewer is evaluating
Structured design: requirements, data model, scaling the read path.
Key points a strong answer covers
- Requirements & scale. Clarify requirements and scale — it's read-heavy.
- Short code generation. Generate short codes from a unique id in base62, or random/hashed with collision checks.
- Storage. Store code → URL in a key-value store or database.
- Redirect & caching. Serve redirects (301/302) from a cache/CDN for hot links.
- Analytics & abuse. Count clicks asynchronously; prevent abuse.
Suggested answer structure
- Clarify requirements, users and scale.
- Sketch the main components and how data flows.
- Choose storage and explain consistency.
- Cover scaling, failure handling and monitoring.
- Call out the trade-offs you made.
Common mistakes
- Jumping to components before requirements.
- Ignoring that reads vastly outnumber writes.
Likely follow-up questions
- 301 or 302 — which would you use, and why?
- How would you avoid two users getting the same short code?
Example strong answer
I'd clarify first: create short links and redirect, optional custom aliases and expiry, maybe 100 million new links a month and a read-to-write ratio around 100:1, so the read path matters most. For codes, I'd take a unique id from a counter or a Snowflake-style id generator and encode it in base62 — seven characters gives trillions of combinations without collisions; random codes would need a uniqueness check. The mapping — code, long URL, owner, expiry — goes in a key-value store or a sharded database keyed by code. Redirects are served from a Redis cache, with popular links cached at the edge; I'd use 302 if we need accurate click analytics, since 301s get cached by browsers. Clicks are logged to a queue and aggregated asynchronously, and new URLs are checked against malware lists and rate limited.
2.
Design the news feed for a social network.
AdvancedSystem designPractise this question and get feedbackWhat the interviewer is evaluating
Fan-out trade-offs and handling hot users.
Key points a strong answer covers
- Requirements. Clarify feed type (ranked or chronological) and scale.
- Fan-out on write. Push: write each post into followers' feeds at post time.
- Fan-out on read. Pull: build the feed at read time from followed users.
- Hybrid for celebrities. Hybrid: push for most users, pull for accounts with huge followings.
- Storage, cache & pagination. Feeds cached (e.g. Redis lists of post ids), cursor pagination, media on a CDN.
Suggested answer structure
- Clarify requirements, users and scale.
- Sketch the main components and how data flows.
- Choose storage and explain consistency.
- Cover scaling, failure handling and monitoring.
- Call out the trade-offs you made.
Common mistakes
- Fanning out a celebrity's post to 50 million feeds synchronously.
- Offset pagination on an infinite feed.
Likely follow-up questions
- How would you add ranking?
- How do you handle a user unfollowing someone?
Example strong answer
I'd clarify whether the feed is chronological or ranked, the number of users, and typical follower counts. The core trade-off is fan-out. Fan-out on write: when someone posts, a background worker inserts the post id into each follower's precomputed feed, cached in Redis — reads are then very fast, but a celebrity with 50 million followers makes writes enormous. Fan-out on read: build the feed when the user opens it by merging recent posts from everyone they follow — cheap writes, expensive reads. So I'd go hybrid: push for normal accounts, pull for very large ones and merge at read time. Feeds store post ids and use cursor-based pagination; post bodies and media come from separate stores and a CDN. Ranking can be a layer that scores candidate posts.
3.
Design a real-time chat application.
AdvancedSystem designPractise this question and get feedbackWhat the interviewer is evaluating
Real-time systems, delivery guarantees and presence.
Key points a strong answer covers
- Persistent connections. WebSockets for real-time delivery.
- Routing between servers. A registry/pub-sub routes messages to the server holding the recipient's connection.
- Storage & ordering. Messages persisted, ordered per conversation (sequence ids), partitioned by conversation.
- Delivery & offline. Acks, retries, offline delivery via push notifications and sync.
- Presence & groups. Presence via heartbeats; fan-out for group chats.
Suggested answer structure
- Clarify requirements, users and scale.
- Sketch the main components and how data flows.
- Choose storage and explain consistency.
- Cover scaling, failure handling and monitoring.
- Call out the trade-offs you made.
Common mistakes
- Using HTTP polling every second at scale.
- No plan for users who are offline.
Likely follow-up questions
- How do you guarantee messages arrive in order?
- How would you add end-to-end encryption?
Example strong answer
Clients keep a WebSocket open to a chat gateway server. When Alice sends a message, the gateway assigns it a per-conversation sequence number, persists it — in a store partitioned by conversation id, like Cassandra or a sharded database — and acknowledges it to Alice. To deliver it, we need to know which gateway Bob is connected to: a connection registry or a pub-sub layer such as Redis routes the message to that server, which pushes it to Bob, who acks it so we can mark it delivered. If Bob is offline, we send a push notification and he syncs missed messages by sequence number when he reconnects. Presence uses heartbeats with a TTL. Group messages fan out to members, with very large groups handled asynchronously.
4.
Design a rate limiter for a public API.
IntermediateSystem designPractise this question and get feedbackWhat the interviewer is evaluating
Algorithms and distributed counters.
Key points a strong answer covers
- Requirements. Clarify keys (user, API key, IP) and limits per tier.
- Algorithm. Token bucket or sliding window.
- Distributed state. Counters in Redis with atomic operations.
- Placement. At the API gateway or as middleware.
- Response & failure mode. 429 + Retry-After; decide fail-open vs fail-closed if Redis is down.
Suggested answer structure
- Clarify requirements, users and scale.
- Sketch the main components and how data flows.
- Choose storage and explain consistency.
- Cover scaling, failure handling and monitoring.
- Call out the trade-offs you made.
Common mistakes
- Per-instance memory counters behind a load balancer.
- Not considering what happens if the limiter's store fails.
Likely follow-up questions
- Fail open or fail closed if Redis goes down?
- How does a sliding window log differ from a sliding window counter?
Example strong answer
I'd clarify the rules: per API key, with tiers like 100 requests per minute free and 1,000 paid, plus a per-IP limit for unauthenticated traffic. For the algorithm, a token bucket allows short bursts while enforcing an average rate; a sliding-window counter is a good approximation that avoids fixed-window edge spikes. State lives in Redis so every API server sees the same counts, updated atomically with a Lua script or INCR plus expiry. It runs at the API gateway or as middleware before the business logic, returning 429 with Retry-After and rate-limit headers. If Redis is unavailable, I'd usually fail open for availability, with a local fallback limit to prevent abuse, and monitor rejections per key.
5.
Design a booking system that must never double-book a slot.
AdvancedSystem designPractise this question and get feedbackWhat the interviewer is evaluating
Consistency under concurrency.
Key points a strong answer covers
- Requirements. Clarify scale, holds and payment flow.
- Prevent double booking. Use a unique constraint, row locks or conditional updates inside a transaction.
- Temporary holds. Hold a slot for a few minutes during checkout, then expire it.
- Idempotency. Idempotent booking requests survive retries.
- Scaling. Cache availability reads; partition by venue/resource.
Suggested answer structure
- Clarify requirements, users and scale.
- Sketch the main components and how data flows.
- Choose storage and explain consistency.
- Cover scaling, failure handling and monitoring.
- Call out the trade-offs you made.
Common mistakes
- Checking availability and then inserting in two separate steps without locking.
- Relying on a cache for availability.
Likely follow-up questions
- How would you handle a surge of 100,000 users for a concert?
- Optimistic or pessimistic locking — which and why?
Example strong answer
I'd clarify scale and the flow — select a slot, hold it while paying, confirm. The core guarantee lives in the database: a booking table with a unique constraint on (resource, slot), so two concurrent inserts can't both succeed; or the slot row's status changes with a conditional update —
UPDATE slots SET status = 'held', hold_until = now() + 10 min WHERE id = ? AND status = 'free'— and only the request that updates one row wins. Holds expire if payment doesn't complete. Requests carry an idempotency key so a retry doesn't create two bookings. Availability pages can be served from a cache or replicas, but the final check always hits the primary. For a big on-sale event I'd add a virtual queue in front, to admit users at a sustainable rate.6.
Design a notification service that sends email, SMS and push notifications.
IntermediateSystem designPractise this question and get feedbackWhat the interviewer is evaluating
Asynchronous, reliable multi-channel delivery.
Key points a strong answer covers
- API & queue. Accept requests via API/events and process asynchronously through queues.
- Channel workers & providers. Separate workers per channel calling providers.
- Preferences & templates. User preferences, opt-outs, templates and localisation.
- Reliability. Retries, dead-letter queues, deduplication, fallback providers.
- Rate limits & tracking. Respect provider limits; track delivery status.
Suggested answer structure
- Clarify requirements, users and scale.
- Sketch the main components and how data flows.
- Choose storage and explain consistency.
- Cover scaling, failure handling and monitoring.
- Call out the trade-offs you made.
Common mistakes
- Sending synchronously inside the user's request.
- Ignoring user preferences and unsubscribes.
Likely follow-up questions
- How would you prevent sending the same notification twice?
- How would you prioritise a password reset over a marketing email?
Example strong answer
Other services publish a notification request — user id, type, data — through an API or an event. The service checks the user's preferences, opt-outs and quiet hours, renders the right localised template, and puts a job on a queue per channel. Email, SMS and push workers pick jobs up and call providers like SES, Twilio, APNs and FCM, with retries and backoff, a fallback provider for critical messages, and a dead-letter queue for permanent failures. Each notification has an idempotency key, so retries never send twice. Separate queues let transactional messages like password resets jump ahead of bulk marketing. I respect provider rate limits, record status — sent, delivered, bounced — and expose delivery analytics.
7.
Design a file storage and sharing service like Dropbox or Google Drive.
AdvancedSystem designPractise this question and get feedbackWhat the interviewer is evaluating
Large-object storage, sync and metadata design.
Key points a strong answer covers
- Metadata vs content. Separate file metadata (database) from contents (object storage).
- Object storage & chunks. Store contents in object storage, split into chunks for resumable upload and dedup.
- Upload / download. Direct uploads via pre-signed URLs; downloads via CDN.
- Sync. Sync clients via change logs and notifications; handle conflicts with versions.
- Sharing & security. Permissions/ACLs, share links, encryption at rest.
Suggested answer structure
- Clarify requirements, users and scale.
- Sketch the main components and how data flows.
- Choose storage and explain consistency.
- Cover scaling, failure handling and monitoring.
- Call out the trade-offs you made.
Common mistakes
- Storing files in the relational database.
- Re-uploading a whole file for a small change.
Likely follow-up questions
- How would you resolve two people editing the same file offline?
- How does chunking enable deduplication?
Example strong answer
I'd separate metadata from content. Metadata — files, folders, versions, owners, permissions — lives in a relational database, sharded by user or workspace. Content lives in object storage. Clients split files into chunks of a few megabytes, hashed by content; uploads go directly to storage through pre-signed URLs, only changed chunks are re-uploaded, and identical chunks can be deduplicated. Each change creates a new file version and an entry in a per-user change log; desktop clients long-poll or keep a connection to learn about changes and pull only the new chunks. Concurrent offline edits create a conflicted copy rather than silently overwriting. Sharing uses ACLs and signed share links, data is encrypted at rest, and downloads go through a CDN.
8.
How do you approach a system design interview question?
BeginnerHRPractise this question and get feedbackWhat the interviewer is evaluating
Interview technique: structure and communication.
Key points a strong answer covers
- Clarify requirements. Clarify functional and non-functional requirements first.
- Estimate scale. Rough estimates of traffic and storage.
- High-level design. High-level components, APIs and data model.
- Deep dive. Deep dive into the hardest parts.
- Trade-offs. Discuss trade-offs and alternatives.
Suggested answer structure
- Answer directly in one or two sentences.
- Back it up with one specific example.
- Connect it to this role and this company.
Common mistakes
- Designing for millions of users before asking any questions.
- Staying silent while thinking.
Likely follow-up questions
- How much time would you spend on each stage?
- What do you do if you don't know a technology the interviewer mentions?
Example strong answer
I treat it as a collaborative design session. First, five minutes clarifying requirements: the core features, who the users are, and non-functional needs like scale, latency, availability and consistency. Then quick back-of-the-envelope estimates — requests per second, storage per year — which shape the design. Next a high-level design: the main components, the APIs and the data model, drawn simply. Then I deep-dive into the hardest parts, usually where the interviewer is steering — the bottleneck, the consistency problem, the hot key. Throughout, I think out loud, name trade-offs and alternatives — 'a SQL database here because we need transactions, at the cost of harder horizontal scaling' — and check in with the interviewer.
Ready to answer them out loud?
Run a timed software engineer mock interview, type or speak your answers, and get a score breakdown with what to improve.