Search
Lessons (40)
- Sorting Algorithms
From simple bubble sort to merge sort and quick sort. See how each one works, compare their speeds …
- Two Pointers & Sliding Window
… pair with target sum (sorted array) js function pairWithSum(sorted, target) { let left = 0; let right = sorted.length …
- Binary Search
Find anything in a sorted list of a billion items in about 30 steps. Learn the classic algorithm …
- DSA Interview Patterns Cheat Sheet
… decision flowchart mermaid flowchart TD S([Read the problem]) -- A{Input sorted,<br/ or 'find in sorted'?} A …
- Big-O Notation Made Simple
… the problem is cut in half every step function binarySearch(sorted, target) { let lo = 0, hi = sorted.length …
- Indexes, EXPLAIN & Query Plans
Design indexes from real filter, join and sort patterns, then prove improvements with query plans and production-like …
- Heaps & Priority Queues
… Top K ⭐ "Find the k largest numbers in a stream of a million numbers." Sorting is O(n …
- Linux Command-Line Essentials
… take column 1 (the IP) → sort → count duplicates → sort by count, biggest first → keep the top 10. Searching …
- JavaScript Language Fundamentals
… Check for null with value === null . </details <details <summary Why does <code [10, 9, 1].sort()</code return …
- Arrays & Strings
… Iterate backwards or use filter . - sort() sorts as strings by default: [10, 9, 1].sort() → [1, 10, 9 …
- Database Indexing & Transactions
… Because the keys are sorted , B-trees also make ORDER BY , BETWEEN and / < fast. Creating and checking indexes …
- Database Internals, Replication and Scaling
… Two main families: - B-tree: keeps data sorted in place. Great for "find order 55" and "orders from …
- Trees & Binary Search Trees
… Root → Right 4, 2, 5, 1, 3 BST → sorted order Post-order Left → Right → Root 4, 5, 2 …
- Graphs: BFS & DFS
… path, nearest X, levels Cycles, connected components, topological sort, mazes, backtracking Both run in O(V + E) : every …
- Consumers & Consumer Groups
… A team can split the pile so each person takes a few mail bags, and nobody sorts the …
- Linux Troubleshooting Playbook & Interview Questions
… Docker removes most of these differences. Useful one-liners Need Command --- --- Top memory users ps aux --sort=-%mem …
- SQL Interview Query Drills
… Ask whether the interviewer instead wants one row or the third row after sorting; the query differs.
- AWS Databases: Choose the Right One
… Reverse sort order for newest first. To get an order only by order ID, you need another deliberate …
- SQL Language, Identifiers & Data Types
… UNION vs UNION ALL UNION removes duplicates, usually with sort/hash work. UNION ALL returns every row and …
- Design a Polite Web Crawler
… One small shop's website links to itself with endless variations: ?sort=price , ?sort=price&page=2 , ?color …
- Behavioral Patterns I: Observer, Strategy, Command, State
… You use it every time you write: js users.sort((a, b) = a.age - b.age); // sorting strategy …
- N+1 Queries, Loading & Pagination
… it with an index matching the filter and sort, such as orders(customer id, created at DESC, id …
- REST API Design
… Paginate, filter and sort lists Never return an unbounded list; one day it will be a million rows …
- Code Profiling
… request - buildReport - sortRows - localeCompare Narrow stack: request - authenticate - verifyToken Investigate the wide path first, then repeat the profile …
- CloudWatch: Know What Your App Is Doing
… code, error code filter request id = "req-123" sort @timestamp asc limit 50 Expected result: log events for …
- React Internals & Concurrent Rendering
… an index changes identity after an insert, removal or sort. {orders.map((order, index) = <OrderRow key={index} order …
- Your Practical Kubernetes Workflow
… name --previous -n team-shop kubectl get events --sort-by=.lastTimestamp -n team-shop kubectl rollout status deployment …
- Big Data: ETL, Warehouses and Streaming
… cleaned, duplicates removed, sorted by event time (when it actually happened, not when it arrived; a phone offline …
- What Are Design Patterns?
… use(middleware) in Express Chain of Responsibility array.sort((a, b) = a - b) Strategy for (const x of …
- Troubleshooting Playbook
… the crashed container Also useful: kubectl get events --sort-by=.lastTimestamp -A . Status by status Pending The pod …
- L6 Production Debugging Casebook
… The database still has to find, sort and throw away about 100,000 rows before giving you the …
- Pods: Where Your App Actually Runs
… kubectl logs <pod-name --previous kubectl get events --sort-by=.lastTimestamp Read them in that order: status, explanation …
- Comments & Formatting
… help Type Example --- --- Why (a decision) // Use insertion sort: lists here are always < 10 items and it's …
- Meaningful Names
… a short loop or (a, b) in a sort comparator. Rule 4: One word per concept Pick one …
- Hash Maps & Sets
… for (const word of words) { const key = [...word].sort().join(""); // "eat" → "aet" if (!groups.has(key)) groups.set …
- Month 1: Data, Math Intuition and Classic ML (Weeks 1-4)
… isna().mean().sort values(ascending=False).head()) print(df.groupby("zip code")["price"].median().sort values().tail(10 …
- Linked Lists
… front removes that special case. js // Merge two sorted lists: 1→3→5 + 2→4 → 1→2→3 …
- Developer Learning Plan and Document-Assistant Capstone
… scored.append((overlap, document)) scored.sort(key=lambda pair: (-pair[0], pair[1]["id"])) return [document for , document …
- SQL vs NoSQL Databases
… ISODate("2026-09-28T10:00:00Z") } db.orders.find({ "customer.email": "ana@mail.com" }).sort({ createdAt: -1 }); 💡 Model …
- Kafka Producers
… A postal worker doesn't drive to the sorting office for every single letter. They collect letters in …