Search

Lessons (10)

  • 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

    … Trust the smaller call. - Each call is a frame on the call stack; very deep recursion can overflow …

  • Graphs: BFS & DFS

    … DFS uses a stack , usually the call stack via recursion. js function dfs(graph, node, visited = new Set …

  • 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

    … logged, then forgotten; the caller thinks it worked try { await saveOrder(order); } catch (e) { console.log(e); } js …

  • Backend Languages: Node.js, Go, Python & Rust

    … one thread + event loop"] EL(("🔁 event loop")) -- IO1[DB call → wait in background] EL -- IO2[HTTP call → wait …

  • Monolith vs Microservices

    … The network is homogeneous. mermaid flowchart LR subgraph InProcess["Monolith"] A1[orders.create] -- "function call<br/ ~0.001 …

  • Structural Patterns: How to Connect Objects

    … e; } } }; // Stack them like toppings const getUser = withLogging(withCache(withRetry(fetchUser)), "getUser"); mermaid flowchart LR Call[getUser 42 …

  • Dynamic Programming

    … the recursive idea) Needs the right fill order Stack overflow risk Yes, on deep inputs No Can save …