Matrix Traversal Interview Patterns
7 min read Grid Traversal Fundamentals Most matrix problems involve: (1) BFS from one or multiple source cells, (2) DFS to explore connected […] Read article
7 min read Grid Traversal Fundamentals Most matrix problems involve: (1) BFS from one or multiple source cells, (2) DFS to explore connected […] Read article
6 min read What is a Webhook? A webhook is a user-defined HTTP callback. When an event occurs in a platform (payment succeeded, Read article
6 min read Why Multi-Region? Single-region deployments fail entirely during a cloud provider AZ or region outage. Multi-region provides: (1) High availability — Read article
7 min read Requirements Generate invoices for subscriptions and one-time purchases Support multiple billing cycles: monthly, annual, usage-based Apply discounts, taxes, and proration Read article
6 min read Requirements Return top-k (k=10) query suggestions as a user types, within 100ms Suggestions ranked by search frequency or relevance score Read article
6 min read Requirements Generate a personalized feed of posts ranked by relevance/recency for each user Supports follow relationships: see posts from users Read article
7 min read Requirements Users can create auction listings with a start price, reserve price, and end time Users place bids; highest bid Read article
6 min read Requirements Track real-time location of mobile assets (drivers, delivery couriers, field workers) 1M active devices sending location updates every 4 Read article
6 min read When to Use an Ordered Map (Sorted Dict / TreeMap) An ordered map maintains keys in sorted order with O(log Read article
6 min read What is a Data Pipeline? A data pipeline is a sequence of data processing steps: collect → transform → store Read article
6 min read Why String Hashing? Naive string comparison is O(L) per comparison where L is the string length. String hashing converts a Read article
6 min read Requirements Create and manage discount coupons (percentage, fixed amount, free shipping) Apply coupon to a cart: validate, compute discount, prevent Read article
6 min read Permission Models Overview Three main models: ACL (Access Control List): per-resource list of who can do what. Simple, fine-grained, but Read article
6 min read When to Use Two Pointers Two pointers reduce O(n²) brute force to O(n) or O(n log n) by exploiting sorted Read article
6 min read Requirements Search available rooms for a date range (check-in, check-out, guests, room type) Book a room: prevent double-booking the same Read article