interviewDeck

Your one-stop platform to prepare, practice and ace your interviews.

Loading your questions…

All Questions

Filters & tools

General Interview Questions and Answers

18 hand-picked General interview questions with detailed answers. Open the interactive version above to search, filter by difficulty, run code, bookmark questions and track your progress.

REST basics — methods, status codes, idempotency.

GET read, POST create, PUT replace, PATCH partial update, DELETE remove. GET/PUT/DELETE are idempotent; POST is not.

Status codes: 200 OK, 201 Created, 204 No Content, 400 bad request, 401 unauthenticated, 403 forbidden, 404 not found, 500 server error.

Explain the JWT authentication flow.

User logs in → server returns a signed JWT (header.payload.signature). The client stores it and sends it as Authorization: Bearer <token>. The server verifies the signature and expiry on each request — no server-side session needed (stateless).

What is CORS and how do you fix it?

CORS (Cross-Origin Resource Sharing) is a browser rule that blocks requests to a different origin unless the server opts in with Access-Control-Allow-Origin headers. Fix it on the server; in dev you can use a proxy.

HTTP vs HTTPS, and what is TLS?

HTTPS is HTTP over TLS, which encrypts traffic, verifies the server's identity via certificates, and prevents tampering. It's required for PWAs, service workers, and modern browser features.

GET vs POST — key differences.

GET — params in the URL, cacheable, idempotent, no body; for reads. POST — data in the body, not cached, not idempotent; for creating/side-effecting operations. Never send sensitive data in a GET query string.

Authentication vs authorization.

Authentication — proving who you are (login). Authorization — what you're allowed to do (roles/permissions). AuthN comes first, then AuthZ.

How does browser/HTTP caching work?

Servers send caching headers: Cache-Control (max-age, no-cache), ETag/Last-Modified for revalidation. The browser reuses cached responses until they expire, then revalidates. CDNs cache at the edge for speed.

Cache-Control: max-age=31536000, immutable

SPA vs SSR vs SSG.

  • SPA — renders in the browser; fast navigation, weaker initial SEO/first paint.
  • SSR — server renders HTML per request; better SEO and first paint (Angular Universal).
  • SSG — pre-render at build time; fastest, best for static content.

What is Big-O and name common complexities.

Big-O describes how runtime/space grows with input size (worst case). Common: O(1) constant, O(log n) binary search, O(n) linear scan, O(n log n) good sorts, O(n²) nested loops.

Array vs Linked List vs Hash Table — tradeoffs.

  • Array — O(1) index access, O(n) insert/delete in the middle.
  • Linked list — O(1) insert/delete at a known node, O(n) access.
  • Hash table — O(1) average lookup/insert, unordered.

What are the SOLID principles?

  • S — Single Responsibility (one reason to change).
  • O — Open/Closed (open to extension, closed to modification).
  • L — Liskov Substitution (subtypes replace base types safely).
  • I — Interface Segregation (small, focused interfaces).
  • D — Dependency Inversion (depend on abstractions).

Explain Agile / Scrum basics.

Scrum works in fixed sprints (1–4 weeks). Ceremonies: sprint planning, daily stand-up, review (demo), and retrospective. Roles: Product Owner (backlog), Scrum Master (process), and the development team.

What is a reverse proxy / load balancer? Nginx basics.

A reverse proxy sits in front of your servers, accepting client traffic and forwarding it inward (clients never see the backends). It centralizes: TLS termination, compression, caching, rate limiting, path routing (/api → backend, / → static Angular files).

A load balancer is a reverse proxy distributing across multiple instances — round robin, least-connections, IP-hash — with health checks ejecting dead backends. (Forward proxy = the mirror image: sits in front of clients.)

server {
  listen 443 ssl;
  location /api/ { proxy_pass http://backend:8080/; }
  location /     { root /usr/share/nginx/html; try_files $uri /index.html; }
}
upstream backend { server app1:8080; server app2:8080; }  # least_conn; health checks

What is a user story? INVEST criteria and acceptance criteria?

A user story is a small requirement from the user's viewpoint: As a <role> I want <capability> so that <benefit> — a placeholder for a conversation, not a spec.

INVEST: Independent (schedulable alone), Negotiable, Valuable (user-visible benefit), Estimable, Small (fits a sprint), Testable.

Acceptance criteria — the concrete conditions that make it done, often Given/When/Then; they become the test cases and kill "that's not what I meant" at demo time.

Story: As a customer I want to filter orders by date so I can find a past order.

Acceptance criteria:
  Given orders exist, When I pick a date range, Then only orders in it show
  Given no orders match, Then an empty state with a clear-filters action shows
  Date range max 1 year; invalid range shows inline validation

Story points and estimation — planning poker, velocity, burndown?

Story points measure relative effort+complexity+uncertainty (Fibonacci 1,2,3,5,8...), not hours — a 5 is 'about like that other 5', which dodges human badness at absolute estimates.

Planning poker: everyone reveals an estimate simultaneously (no anchoring); big splits trigger discussion — the outliers usually know something. T-shirt sizing (S/M/L) for coarse roadmap-level sizing.

Velocity — points completed per sprint, averaged; it's the team's empirical capacity for forecasting, never a performance KPI. Burndown — remaining work vs time in the sprint; a flat line mid-sprint = blocked or bad breakdown.

Definition of Ready vs Definition of Done? How do you handle mid-sprint scope changes?

DoR — a story may enter a sprint only when: clear acceptance criteria, dependencies identified, estimated, testable. Protects the sprint from half-baked work.

DoD — 'done' means: code + review + tests passing, acceptance criteria met, merged, deployed to the agreed environment, docs updated. One shared definition kills "done but not done-done".

Mid-sprint changes: the sprint goal is protected — genuine urgencies (prod incident) swap something out of equal size rather than piling on; everything else goes to the backlog for next planning. Constant mid-sprint churn is a signal to shorten sprints or move to Kanban.

Kanban vs Scrum?

  • Scrum — fixed-length sprints with commitment, defined roles (PO/SM), ceremonies (planning, standup, review, retro), velocity per sprint. Fits feature work that batches well.
  • Kanban — continuous flow, no sprints: a board with WIP limits per column; pull the next item when capacity frees; measure cycle time and throughput. Fits support/ops and interrupt-heavy streams.

Many teams run Scrumban — sprint cadence for planning/retros, WIP limits and pull for daily flow.

How do you translate functional requirements into technical/system requirements? What is performance engineering?

A repeatable pipeline:

  1. Clarify the functional requirement with concrete scenarios and acceptance criteria (what exactly must happen, for whom, how often).
  2. Derive system requirements — data model changes, API contracts (endpoints, payloads, status codes), integration points, authorization rules.
  3. Extract the non-functionals hidden inside — expected volumes, latency targets, concurrency, auditability, retention. "Show order history" secretly contains pagination, an index, and an SLA.
  4. Design + spike unknowns, then split into estimable stories with traceability back to the source requirement.

Performance engineering — treating performance as a requirement through the lifecycle, not a post-hoc fix: set numeric targets (p95 latency, throughput), test against them (JMeter/Gatling, Lighthouse for frontend), profile bottlenecks (APM, EXPLAIN plans, bundle analysis), fix, and guard in CI (perf budgets) so regressions fail the build.