Search

Lessons (30)

  • Indexes, EXPLAIN & Query Plans

    Design indexes from real filter, join and sort patterns, then prove improvements with query plans and production-like …

  • Database Indexing & Transactions

    … smaller and faster Covering ( INCLUDE ) Answer the query from the index alone The cost of indexes Indexes aren …

  • Transactions, Indexes & Concurrency

    Interview answers for triggers, ACID, clustered indexes, deadlock/livelock and RAID. Covers PDF questions 8-11 and 18 …

  • Hash Maps & Sets

    … The most famous interview question. js function twoSum(nums, target) { const indexOf = new Map(); // value β†’ index for (let …

  • Design a Ride-Sharing Service

    Match riders and drivers with a geo index, safely lease availability, and treat location as a fast-changing …

  • Database Relations & Foreign Keys

    … Add an index on orders(customer id) when the product frequently loads a customer orders. A foreign key …

  • Data Structures for Scale

    Use geospatial indexes and probabilistic structures to make huge queries practical while understanding their error bounds. ![Scale-oriented …

  • Arrays & Strings

    … equally sized boxes side by side, reached instantly by index](/img/dsa/array-memory.svg) That's why …

  • Database Internals, Replication and Scaling

    … Use indexes and query plans before adding hardware. Replicas increase read capacity but add lag; route read-your …

  • SQL Language, Identifiers & Data Types

    … UUIDs can be generated without a central counter and help distributed writes, but cost more index space. Generated …

  • Vertical Slice Architecture & the Modular Monolith

    … schema) β”œβ”€β”€ catalog/ β”‚ └── index.ts export { getProductSnapshot } from "./application/…" └── billing/ └── index.ts ts // modules/catalog/index.ts β€” the catalog …

  • Design a Logging and Monitoring Platform

    … A durable stream absorbs bursts; processors index a bounded hot window and archive older data cheaply. Partition by …

  • Binary Search

    … find the first / last position "Find the first index where x appears" in [1, 2, 2, 2, 3 …

  • Storage Engines & Database Operations

    … matters A storage engine decides how rows and indexes reach disk. You do not need to implement one …

  • Replication, Partitioning & Sharding

    … Do not shard because it sounds scalable; exhaust indexing, caching, replicas and partitioning where appropriate first.

  • N+1 Queries, Loading & Pagination

    … id DESC LIMIT 50 Support it with an index matching the filter and sort, such as orders(customer …

  • Two Pointers & Sliding Window

    … longestUniqueSubstring(s) { const lastSeen = new Map(); // char β†’ last index let left = 0; let best = 0; for (let right …

  • Kafka vs RabbitMQ & the Kafka Ecosystem

    … the easiest way to implement the outbox pattern or to stream database changes to search indexes and warehouses …

  • Big-O Notation Made Simple

    … hidden loops Some one-liners hide a loop inside: Code Cost --- --- arr.includes(x) , arr.indexOf(x) O …

  • Structural Patterns: How to Connect Objects

    … README.md", 2), new Folder("src", [new File("index.js", 10), new File("app.js", 25)]), ]); project.getSize …

  • Stacks & Queues

    … new Array(nums.length).fill(-1); const stack = []; // indexes still waiting for a bigger number for (let i …

  • Linked Lists

    … Seriously. Key takeaways - Linked lists trade O(1) index access for O(1) insert/delete at known positions …

  • How a Web Request Works

    … keep-alive connections (skip handshakes), caching and database indexes . All covered in later lessons. Key takeaways - DNS finds …

  • What Is Apache Kafka?

    … K K -- DB[(DB sync)] K -- SE[Search index] K -- AN[Analytics] K -- MON[Monitoring] end Producers publish …

  • React Fundamentals

    … Using the array index as the key causes bugs when items are reordered or removed. State: data that …

  • Trees & Binary Search Trees

    … DOM , JSON objects, React component trees, and database indexes (B-trees). Tree vocabulary ![Tree vocabulary: root, parent, child …

  • Heaps & Priority Queues

    … No node objects needed: For the node at index i Formula --- --- Parent Math.floor((i - 1) / 2) Left …

  • REST API Design

    … c["DB jumps straight there<br/ using the index ⚑"] end Rule 5: Idempotency for unsafe retries ⭐ Networks fail …

  • Normalization & Denormalization

    … A query cannot safely join, constrain, index, or update one item inside that string. Good 1NF shape: one …

  • Caching & Redis

    … ms In the next room Database with an index ~5 ms Downstairs Slow DB query / external API 100 …