All Software Engineer Interview Flashcards
All 150 Software Engineer interview flashcards. Tap any question to practice it.
Easy (50)
- What is the average time complexity of looking up a value by key in a hash table?
- What is the time complexity of binary search on a sorted array?
- Which data structure follows Last-In-First-Out (LIFO) order?
- Which order does a queue follow?
- Which gives O(1) random access by index: an array or a linked list?
- In JavaScript, what is the difference between null and undefined?
- What is the main semantic difference between HTTP GET and POST?
- What does it mean for an HTTP method to be idempotent?
- What does HTTP status code 404 mean?
- What does HTTP status code 500 mean?
- What is the difference between a compiled and an interpreted language?
- What is the difference between git commit and git push?
- What causes a git merge conflict?
- What is a primary key in a relational database?
- What is a foreign key?
- What does a SQL INNER JOIN return?
- Is an empty string truthy or falsy in most languages like JavaScript and Python?
- What is the difference between local and global scope?
- Why does a recursive function need a base case?
- What does it mean for an object to be immutable?
- What is the purpose of a try/catch block?
- What does REST stand for?
- What is JSON used for?
- What does the logical AND operator return when one operand is false?
- What is the difference between a compile-time and a runtime error?
- What does concatenation do to two strings?
- What is a constant in programming?
- Name one advantage of an iterative loop over recursion.
- What is the difference between a parameter and an argument?
- What is the purpose of code comments?
- What does the NOT operator do to a boolean value?
- In a zero-indexed array, what index holds the first element?
- Which popular language uses indentation/whitespace to define code blocks?
- Why do teams use version control like Git?
- What is an environment variable typically used for?
- What does a unit test verify?
- In many C-style languages, what is the difference between = and ==?
- What is the main purpose of a cache?
- In web development, what is the difference between client-side and server-side code?
- What does DNS do?
- How do you typically get the number of elements in an array?
- Is the integer 0 truthy or falsy in languages like Python and JavaScript?
- What is the difference between an inline comment and API documentation?
- What is machine code?
- What is pseudocode?
- What happens when you access an array index that does not exist?
- Why might 5 + 5 give an unexpected result in JavaScript?
- What does short-circuit evaluation mean for the || operator?
- What does a function return if it has no explicit return statement (in JS/Python)?
- What does a linter do?
Medium (50)
- What is a hash collision and one common way to resolve it?
- What is the average and worst-case time complexity of quicksort?
- What does it mean for a sorting algorithm to be stable?
- What does the ACID acronym stand for in databases?
- What is one downside of adding a database index?
- What is the goal of database normalization?
- What is the N+1 query problem?
- What is a deadlock?
- What is a race condition?
- What is a mutex used for?
- What is the key difference between a process and a thread?
- What is the main difference between TCP and UDP?
- What does HTTPS add over HTTP?
- What is the difference between session cookies and token-based (JWT) auth?
- What problem does CORS address?
- What is SQL injection and how do you prevent it?
- What is cross-site scripting (XSS)?
- Why design a payment API endpoint to be idempotent?
- Why use cursor-based instead of offset-based pagination for large datasets?
- What are the two hard problems often joked about in CS, one being naming?
- What is memoization?
- What problem does dependency injection solve?
- Why program to an interface rather than a concrete implementation?
- What is the average time complexity of checking membership in a hash set?
- When would you prefer BFS over DFS for graph traversal?
- What is the height of a balanced binary tree with n nodes?
- What does a garbage collector do?
- What is a memory leak in a garbage-collected language?
- What is the difference between pass-by-value and pass-by-reference?
- What is optimistic locking?
- Why should database migrations be idempotent or carefully ordered?
- What is one difference between REST and RPC API styles?
- What is the difference between HTTP 401 and 403?
- What does HTTP 201 mean?
- Why use a database connection pool?
- What is eventual consistency?
- What is the difference between throughput and latency?
- What does a load balancer do?
- What is the difference between horizontal and vertical scaling?
- Why are stateless services easier to scale?
- What is the space complexity of standard merge sort?
- Why do computers use two's complement for signed integers?
- Why can 0.1 + 0.2 not exactly equal 0.3 in floating point?
- What is the difference between ASCII and Unicode?
- In semantic versioning MAJOR.MINOR.PATCH, when do you bump MAJOR?
- What is the difference between a mock and a stub?
- What does code coverage measure, and what does it not guarantee?
- What is continuous integration (CI)?
- What is a feature flag used for?
- What does graceful degradation mean in software?
Hard (50)
- What does the CAP theorem state?
- What problem do consensus algorithms like Raft and Paxos solve?
- In Raft, what triggers a new leader election?
- What is the main weakness of two-phase commit?
- How do idempotency keys prevent duplicate side effects in a distributed system?
- What are vector clocks used for?
- What is a Bloom filter and its key tradeoff?
- Why is consistent hashing used in distributed caches/sharding?
- Why do databases like Cassandra and RocksDB use LSM trees?
- What is the purpose of a write-ahead log (WAL)?
- What is multiversion concurrency control (MVCC)?
- What anomaly does the READ COMMITTED isolation level still allow?
- What does the SERIALIZABLE isolation level guarantee?
- What is backpressure in streaming systems?
- Why is true exactly-once delivery hard, and how is it approximated?
- Why can tail latency (p99) dominate user experience in fan-out systems?
- What is the thundering herd problem and one mitigation?
- Why is a Redis-based distributed lock risky?
- What is the saga pattern for distributed transactions?
- Why must Kafka consumers usually be idempotent?
- When is a B-tree index preferable to a hash index?
- What does a SQL query planner do?
- What is a covering index?
- What does a lock-free algorithm guarantee?
- What does a happens-before relationship establish in a memory model?
- What is false sharing in multicore systems?
- What does amortized O(1) mean for a dynamic array append?
- What is the tradeoff of a generational, stop-the-world GC?
- What is the role of the TLB in virtual memory?
- What is coordinated omission in latency measurement?
- Why can a client timeout not tell you whether the server processed the request?
- How does a token bucket rate limiter work?
- What does the circuit breaker pattern do?
- What is a CRDT?
- What causes a hot shard and how do you avoid it?
- Name a technique to prevent cache stampedes on expiry.
- How do you add a NOT NULL column to a huge table without downtime?
- Why is idempotency preferred over chasing exactly-once delivery?
- What problem does distributed tracing solve?
- What user-facing anomaly can replication lag cause?
- In a quorum system with N replicas, what condition ensures strong consistency?
- What is the time complexity of Dijkstra's algorithm with a binary heap?
- When can you topologically sort a graph?
- What two properties make a problem suitable for dynamic programming?
- What does it mean for a problem to be NP-complete?
- How does a system capture a consistent snapshot across distributed nodes?
- Why is TLS session resumption important for performance?
- Why is declarative infrastructure (e.g., Terraform) considered idempotent?
- What is a Heisenbug?
- Why decouple deploy from release using expand-and-contract schema changes?
Ready to practice the full interview?
Try a 10-minute interview for free!
No credit card needed.
