Question library
Explained questions for the decisions developers make.
Browse the complete question directory
Answer technique
Scope & execution
Functions & objects
Async JavaScript
Runtime & modules
TypeScript
Output prediction
Node internals
Express lifecycle
HTTP & APIs
Authentication & security
Production engineering
Modules & dependency injection
Request lifecycle
Validation & authorization
Database integration
Background work & deployment
Data modeling
Indexes & query plans
Aggregation
Transactions & scaling
Mongoose
Query performance
SQL & joins
Window functions
Transactions & locking
Indexes & optimization
PostgreSQL & ORMs
Rendering & state
Hooks
State & performance
Next.js architecture
Security & deployment
Architecture & API design
Scaling & distributed systems
Messaging & reliability
Design scenarios
- How would you design a workflow automation platform?
- How would you design an HR integration platform?
- How would you design an investment analytics platform?
- How would you design a notification service?
- How would you design a URL shortener?
- How would you design a chat system?
- How would you design a file processing system?
- How would you design an e-commerce platform?
- How would you design a real-time dashboard?
- How would you design an order-book-like matching system?
Performance
Security
- Authentication vs authorization vs RBAC?
- What makes JWT or session authentication safe?
- How should I store passwords and secrets?
- XSS vs CSRF vs CORS?
- How do I prevent SQL injection, NoSQL injection and SSRF?
- What are least privilege, TLS and secure headers?
- Is rate limiting enough to prevent every attack?
Observability
Production incidents
- API latency jumps from 200ms to 5s. What do I do?
- PostgreSQL CPU becomes very high. What do I check?
- MongoDB aggregation becomes slow. What do I check?
- Node memory keeps growing. How do I investigate?
- The event loop is blocked. What do I do?
- The database connection pool is exhausted. What do I do?
- Authentication tokens are being abused. What do I do?
- A third-party API starts timing out. What do I do?
- Duplicate workflow jobs are processed. How do I fix this?
- A deployment causes intermittent 500s. What do I check?
Testing
Git
Docker
CI/CD
Cloud
Troubleshooting
Project discussion
- What was the project?
- What problem did it solve?
- What was your role?
- Which technologies did you use?
- Why did you choose the technology?
- How was the API structured?
- How was data modeled?
- How did authentication work?
- How were errors handled?
- How were integrations handled?
- What was the hardest technical problem?
- What performance issue did you face?
- What database optimization did you perform?
- What failure scenarios existed?
- How did you handle retries?
- How did you prevent duplicate processing?
- How did you secure the application?
- What would happen at 10x traffic?
- What is the bottleneck?
- What would you cache?
- Where could a race condition happen?
- What happens if a third-party integration is unavailable?
- What happens if a database transaction fails halfway?
- How would you monitor this system?
- What would you redesign today?
Technical deep dives
Review reasoning
- How do I check correctness?
- How do I check security?
- How do I check performance?
- How do I check reliability?
- How do I check maintainability?
- Which edge cases and tests matter most?
- What can break in production, and how would I debug it?
- What review comment would I leave?
- How do I spot common React and async bugs?
Code review exercises
Behavioral
Coding
Start here
AI and LLM fundamentals
- AI, machine learning, deep learning, and generative AI
- LLMs and how they work
- Tokens and token usage
- Context window and context construction
- Temperature and top-p
- System, user, assistant, and tool messages
- Prompt engineering, zero-shot, and few-shot prompting
- Structured output and JSON output
- Function calling and tool calling
- Streaming
- Multimodal models, vision, and audio
- Model selection, routing, fallback, latency, and cost
- Provider ecosystems: OpenAI, Anthropic, Gemini, and Azure OpenAI
Python for AI engineers
Embeddings
- Embeddings, vectors, dimensions, and semantic similarity
- Similarity and cosine similarity
- Embedding models, generation, storage, and limitations
- Explain an embedding.
- What does cosine similarity tell you?
- How do you upgrade embedding models?
- Policy-code search fails despite good semantic search. What do you do?
Vector databases and search
RAG, beginner to advanced
- RAG: three levels of understanding
- Document ingestion, PDF processing, and parsing
- Chunking, chunk size, overlap, and metadata
- Retrieval, context construction, and prompt construction
- Citations and source attribution
- Query rewriting, multi-query retrieval, and query decomposition
- Hybrid RAG, reranking, and parent-child retrieval
- Multi-hop RAG and agentic RAG
- Corrective RAG, self-reflective RAG, and context compression
- Graph RAG
- RAG evaluation and comparison with alternatives
Agents and agent patterns
LangChain
LangGraph, in depth
- What LangGraph is and why it exists
- State and reducers
- Nodes, edges, conditional edges, and routing
- Practical TypeScript graph with an approval pause
- Checkpoints, persistence, and memory
- Interrupts and human review
- Tool integration and the agent loop in a graph
- Subgraphs and multi-agent graphs
- Streaming graph events
- Errors, retry logic, and recovery
- Production architecture and choosing LangGraph
Modern agent frameworks
Deterministic and agentic workflows
Workflow orchestration
Model Context Protocol (MCP)
AI memory
AI security
- Prompt injection, indirect injection, and jailbreaking
- Tool poisoning and excessive agency
- Data leakage, PII, sensitive data, and secrets
- Authentication, authorization, least privilege, and tenant isolation
- Validation, rate limiting, and secure database access
- What is prompt injection?
- Why avoid direct database access?
- What are the main trust boundaries?
- An invoice tells the agent to email private records. What blocks it?
Guardrails
- Input, output, and tool guardrails
- Schema validation: Zod and Pydantic
- Moderation and PII detection
- Hallucination mitigation, business rules, and approval
- What is a guardrail?
- Does valid structured output mean safe output?
- What should fail closed?
- A moderation check rejects legitimate injury descriptions. What do you do?
AI evaluation
AI observability
Cost and performance
AI gateways
Multimodal AI
Local AI
Fine-tuning
Cloud AI
MERN and AI
- Shared MERN architecture
- AI chatbot
- Streaming AI chatbot
- RAG chatbot
- AI search
- AI summarizer
- AI extractor
- AI classifier
- Customer-support agent
- CRM assistant
- Email assistant
- Workflow automation and introducing Python/FastAPI
- Where does the LLM call belong?
- How do MongoDB, Redis, and a vector index differ?
- How do you structure the backend?
- A React chat UI renders malicious generated HTML. What changes?
MongoDB and AI
AI system design
- Scalability, availability, reliability, and latency
- Queues, caching, databases, and vector indexes
- Providers, failover, security, multi-tenancy, and observability
- Design 1: RAG chatbot
- Design 2: Customer-support agent
- Design 3: Insurance claim agent
- Design 4: AI CRM agent
- Design 5: Document processing system
- Design 6: Email agent
- Design 7: Research agent
- Design 8: Multi-agent system
- Design 9: Enterprise knowledge assistant
- What questions come before architecture?
- How do you scale agent traffic?
- How do you design degraded behavior?
- Design an insurance assistant in two minutes.
Insurance AI reference project
Practical project roadmap
- Project 1 — Basic LLM chatbot
- Project 2 — Streaming AI chatbot
- Project 3 — PDF RAG assistant
- Project 4 — Production RAG application
- Project 5 — Tool-calling agent
- Project 6 — LangGraph agent
- Project 7 — Multi-agent customer support
- Project 8 — MCP server plus AI agent
- Project 9 — Deterministic plus agentic workflow
- Project 10 — Production insurance AI platform
Interview preparation
LLMs
Prompt engineering
RAG
Vector databases
LangGraph
AI agents
MCP
Microsoft Agent Framework
Workflows
Memory
Evaluation
Cost optimization
Python
FastAPI
Senior engineer decision framework
- The decision mindset
- Do I need AI? Can deterministic code solve it?
- Do I need an LLM?
- Do I need RAG?
- Do I need tools? Do I need MCP?
- Do I need an agent? Do I need LangGraph?
- Should this be a workflow?
- Where is human approval required?
- How do I secure it?
- How do I evaluate it?
- How do I observe it?
- How much does it cost?
- How does it scale?
- Real client decisions
- Stable concepts, framework concepts, and changing APIs
- A concrete architecture proposal template
Interview revision cheat sheet
Foundations & core patterns
Linear data structures
Trees, heaps & graphs
Algorithms & problem-solving patterns
Advanced patterns & priorities
Interview practice & revision
Java implementations
- Java DSA basics
- Arrays and strings in Java
- Hashing and maps in Java
- Linked list in Java
- Stack and queue in Java
- Recursion and backtracking in Java
- Trees and BST in Java
- Heaps and priority queue in Java
- Graphs in Java
- Dynamic programming in Java
- Sorting and searching in Java
- Bit manipulation in Java
- Important interview questions for Java
- Best Java DSA interview practice list
JavaScript implementations
- JavaScript DSA basics
- Arrays and strings in JavaScript
- Hashing and maps in JavaScript
- Linked list in JavaScript
- Stack and queue in JavaScript
- Recursion and backtracking in JavaScript
- Trees and BST in JavaScript
- Heap and priority queue in JavaScript
- Graphs in JavaScript
- Dynamic programming in JavaScript
- Greedy and binary search in JavaScript
- Sliding window and two pointers in JavaScript
- Important JavaScript DSA interview topics
- JavaScript interview-friendly practice list
C# / .NET implementations
- .NET DSA fundamentals
- Arrays and strings in C#
- Hashing in .NET
- Linked list in C#
- Stack and queue in .NET
- Recursion and backtracking in C#
- Trees and BST in C#
- Heap and priority queue in .NET
- Graphs in C#
- Dynamic programming in C#
- Sorting and searching in C#
- Sliding window and two pointers in C#
- Important .NET interview questions
- Best .NET DSA practice list
Python implementations
- Python DSA basics
- Arrays and strings in Python
- Hashing and maps in Python
- Linked list in Python
- Stack and queue in Python
- Recursion and backtracking in Python
- Trees and BST in Python
- Heap and priority queue in Python
- Graphs in Python
- Dynamic programming in Python
- Binary search and greedy in Python
- Sliding window and two pointers in Python
- Important Python interview topics
- Best Python DSA practice list
Foundations & responsibility boundaries
State, rules & graph execution
Scope, safety & external actions
Testing, reuse & architecture choices
Production lessons & implementation
Foundations & architecture
Protocol & lifecycle
Capabilities & transports
TypeScript implementation
Reliability & advanced features
Production, projects & interviews
How should I explain a technical concept?
A good interview explanation gives the listener a usable understanding of a concept, not just a memorized definition. Start with what it is, why it exists and how it works at a basic level. Then connect the idea to an example, a mistake or a trade-off so the interviewer can follow your reasoning.
What should I study first?
Preparation works best when later topics build on earlier ones. JavaScript scope and async behavior support Node and React; database rules support backend correctness and system design. Follow the sequence, but spend extra time where you cannot yet explain a concept without reading the answer.
How do I answer a debugging question?
A debugging answer is an investigation plan that narrows a symptom to a cause using evidence. It should explain what you would measure, what the result would mean and what you would do next. Separate reducing user impact now from proving and preventing the underlying defect.
What if I do not know an answer?
An honest answer can still show strong engineering judgment when part of a topic is unfamiliar. Clearly separate facts you know, assumptions you are making and details you would verify. This lets the interviewer assess your reasoning without being misled by confident guesses.
How do I explain my own work?
A project answer should connect a real business problem with your specific contribution and its outcome. The problem → responsibility → action → result structure keeps the story clear without hiding technical details. Add the reason for an important decision and the trade-off you accepted.
How can I reduce dependence on AI?
Reducing AI dependence means being able to understand, test and change a solution without treating generated output as authority. Use AI as a source of candidate ideas, then establish correctness through your own reasoning and evidence. The goal is independent judgment, not avoiding useful tools entirely.
What is an execution context and call stack?
An execution context is the information JavaScript uses while running a piece of code, including its variables, scope and this value. The call stack tracks which function is currently running and where execution should return. Each function call adds a context, and returning removes it.
What is scope? What does lexical mean?
Scope is the part of a program where a variable can be accessed. JavaScript uses lexical scope, which means the available outer variables depend on where a function was defined, not where it is later called. The engine searches outward through surrounding scopes when a name is not found locally.
What is the difference between var, let and const?
var, let and const declare variables, but they have different scope and initialization rules. let and const are block-scoped, making it easier to keep a variable inside the code that needs it. const prevents reassignment of the binding; it does not make an object immutable.
What are hoisting and the TDZ (Temporal Dead Zone)?
Hoisting is JavaScript's behavior of processing declarations before executing the code in a scope. Because of this, a function declaration can usually be called before its line appears, while variables behave differently depending on how they are declared.
Are objects passed by reference?
JavaScript passes every argument by value. For an object, the copied value is a reference to that object, so the caller and function can still reach the same underlying object. This explains why changing a property affects the caller, but assigning a new object to the parameter does not.
What is the difference between == and ===?
== is loose equality: it may convert values to compatible types before comparing them. === is strict equality: it compares without that conversion. Strict equality usually makes application checks easier to understand because strings, numbers and booleans are not silently treated as the same value.
What are null, undefined and NaN?
undefined usually means a value has not been supplied, while null is commonly used to mark an intentionally empty value. NaN means a numeric calculation or conversion did not produce a valid number. These are different cases, so an API should not treat them as interchangeable without a clear rule.
What is a closure?
A closure is a function together with access to the variables in the scope where it was created. That access remains available even after the outer function has finished running. Closures are useful for private state, callbacks and functions configured with some remembered value.
How does this work? How are arrow functions different?
this is the receiver used when a regular function runs, and its value usually depends on how the function is called. Arrow functions do not create their own this; they use the surrounding one. This matters when a method is passed as a callback and loses its original receiver.
How do prototypes and classes work?
A prototype is an object from which another object can inherit properties and methods. When a property is missing on an object, JavaScript follows its prototype chain until it finds the property or reaches null. Classes provide structured syntax for constructing objects and sharing methods through that mechanism.
How does async JavaScript run?
Asynchronous JavaScript lets a program start work that may finish later without waiting synchronously for the result. A promise represents eventual completion, and async/await provides a readable way to work with promises. The runtime queues continuations and runs them when the current synchronous work has finished and the relevant checkpoints are reached.
Which Promise method should I use?
Promise combinators combine several promises into one result. The correct method depends on whether you need every success, every outcome, the first outcome or the first success. They observe promises; they do not automatically cancel ongoing operations when the combined result settles.
Difficulty is an editorial estimate. Completion means you chose to mark a question as understood.