Search
Lessons (15)
- Stacks & Queues
… Avoid shift() on large arrays; use a proper queue. - Stacks: undo, call stack, bracket matching, DFS, monotonic-stack …
- JavaScript Essentials: Event Loop, Closures & this
… call stack, Web APIs, task queues](/img/frontend/event-loop.svg) Part Kitchen analogy Role --- --- --- Call stack The …
- Recursion & Backtracking
… Learn to think recursively, visualise the call stack, and use backtracking to explore all possibilities. The big idea …
- Graphs: BFS & DFS
… DFS uses a stack , usually the call stack via recursion. js function dfs(graph, node, visited = new Set …
- DSA Interview Patterns Cheat Sheet
… next greater,<br/ undo, nesting?} ST -- yes STK[Stack] ST -- no SORT[Try sorting first 🤔] Keyword → pattern …
- Big-O Notation Made Simple
… each pending call sits on the call stack . A recursion 10,000 levels deep uses O(10,000 …
- Clean Error Handling
… log the full stack res.status(status).json({ error: status === 500 ? "Something went wrong" : error.message, // never leak …
- How Browsers Render a Page
… The GPU stacks these layers into the final image. JavaScript can block everything When the parser meets a …
- Backend Languages: Node.js, Go, Python & Rust
… I/O-heavy APIs, real-time apps, full-stack JS CPU-heavy work blocks the loop (use worker …
- Linked Lists
… LRU caches (doubly linked list + hash map), undo stacks, OS task scheduling. Technique 1: Traverse js function toArray …
- Monolith vs Microservices
… Each team owns its services ✅ Tech choice One stack Best tool per service ✅ Failure isolation One bug can …
- Arrays & Strings
… If you need fast adds and removes at both ends, use a queue or deque (see Stacks & Queues …
- Behavioral Patterns I: Observer, Strategy, Command, State
… participant E as Editor participant H as History stack U- E: execute(insert "Hello") E- H: push U …
- Dynamic Programming
… the recursive idea) Needs the right fill order Stack overflow risk Yes, on deep inputs No Can save …
- Structural Patterns: How to Connect Objects
… args); } catch (e) { if (i = attempts) throw e; } } }; // Stack them like toppings const getUser = withLogging(withCache(withRetry(fetchUser …