Software Engineer Interview Questions and Answers
For backend and general software roles: design, databases, reliability and ownership. Each answer lists the points interviewers listen for, so you can say it in your own words.
Software engineer questions (9)
01
How would you design a REST API for an online store's orders?
mediumtechnicalProduct & startupsBig tech / MNCWhat the interviewer is checking: API design sense: resources, status codes, errors, versioning, safety.
A strong answer covers
- Resources: /orders, /orders/{id}, /orders/{id}/items; verbs map to actions.
- Clear status codes: 201 created, 400 bad input, 401/403 auth, 404, 409 conflict.
- Pagination and filtering for lists.
- Idempotency keys for create and payment calls so retries do not duplicate orders.
- Versioning (/v1) and consistent error bodies.
02
Design a URL shortener.
hardtechnicalProduct & startupsBig tech / MNCWhat the interviewer is checking: System design basics: requirements, data model, scaling, trade-offs.
A strong answer covers
- Clarify requirements: traffic, custom aliases, expiry, analytics.
- Key generation: base62 from a counter or random IDs with collision checks.
- Storage: key → URL in a key-value store; cache hot links in Redis.
- Redirect with 301/302 and explain the analytics trade-off.
- Scale reads with caching and replicas; handle abuse with rate limits.
03
What is a database index and when can it hurt?
mediumtechnicalWhat the interviewer is checking: Understanding of performance trade-offs.
A strong answer covers
- An index (usually a B-tree) lets the database find rows without scanning the whole table.
- Great for frequent filters, joins and sorting.
- Costs: slower inserts and updates, extra storage.
- Low-selectivity columns or unused indexes add cost without benefit.
- Check with EXPLAIN before and after.
04
When would you choose SQL vs NoSQL?
mediumtechnicalProduct & startupsWhat the interviewer is checking: Picking tools for the problem rather than by habit.
A strong answer covers
- SQL: relationships, transactions, strong consistency (orders, payments).
- NoSQL: flexible schema, huge scale, simple access patterns (logs, sessions, catalogues).
- Many systems use both.
- Decide by access patterns and consistency needs.
05
Two requests try to withdraw from the same account at once. How do you prevent a wrong balance?
hardtechnicalBanks & fintechBig tech / MNCWhat the interviewer is checking: Concurrency control and correctness, critical in fintech.
A strong answer covers
- Explain the race: both read the old balance, both subtract.
- Use a database transaction with a row lock (SELECT … FOR UPDATE), or an atomic conditional update (UPDATE … SET balance = balance - x WHERE balance >= x).
- Optimistic locking with a version column as an alternative.
- Make the operation idempotent so retries do not double-charge.
06
Production is slow after your release. What do you do?
mediumsituationalWhat the interviewer is checking: Calm, structured incident handling.
A strong answer covers
- First reduce impact: roll back or switch off the feature if possible.
- Check dashboards: latency, errors, CPU, database, recent changes.
- Narrow down with logs and traces to the slow component.
- Fix, verify, then write a short post-incident note with prevention steps.
07
What do you look for in a code review?
easybehaviouralProduct & startupsBig tech / MNCWhat the interviewer is checking: Quality mindset and teamwork.
A strong answer covers
- Correctness and edge cases first.
- Readability and naming.
- Tests for the change.
- Security and performance risks.
- Kind, specific comments; approve small things, discuss big ones.
08
How does caching help, and what can go wrong?
mediumtechnicalWhat the interviewer is checking: Practical performance knowledge.
A strong answer covers
- Caching stores results close to the reader to save time and load.
- Strategies: cache-aside, write-through, TTLs.
- Problems: stale data, cache stampede, memory limits.
- Invalidation rules must be clear; keep the database as the source of truth.
09
Tell me about something you built end to end and owned.
mediumbehaviouralProduct & startupsBig tech / MNCWhat the interviewer is checking: Ownership beyond writing code: design, rollout, monitoring.
A strong answer covers
- Problem and why it mattered.
- Design choices and trade-offs.
- How you shipped safely (tests, staged rollout).
- Measured results after launch.
- What you would do differently.
Also asked in every software engineer interview
- Tell me about yourself.
- Why do you want to work here?
- What is your greatest strength?
- What is your biggest weakness?
- Tell me about a time you disagreed with a teammate or manager.
- Tell me about a time you failed.
- Describe a time you worked under a tight deadline.
- Where do you see yourself in five years?
- What are your salary expectations?
- What is your notice period? Can you join early?
- Do you have any questions for us?
- Why are you leaving your current job?

