Level Order Traversal: The Standard Application of BFS in Binary Trees
Master the standard template for binary tree level order traversal and its variants (zigzag, right side view, level averages), with all solutions implemented in TypeScript.
718 words
|
4 minutes
Linked List Two Pointers: The Elegant Use of Fast and Slow Pointers
Master the core techniques of two pointers on linked lists: using fast and slow pointers to find the middle node, detect cycles, and locate intersections, with all classic problems implemented in TypeScript.
1000 words
|
5 minutes
Linked Lists: From Nodes to LRU Cache in TypeScript
A deep dive into linked list operations, reversal techniques, and TypeScript implementations of LFU/LRU caches, with complete code.
928 words
|
5 minutes
Prefix Sums: Reducing Range Sum Queries from O(n) to O(1)
Master the core idea and variants of prefix sums (2D prefix sums, difference arrays, subarrays with sum K), and implement high-frequency interview problems in TypeScript.
894 words
|
4 minutes
Randomized Algorithms: Shuffling, Reservoir Sampling, and Monte Carlo
Master classic randomized algorithms like Fisher-Yates shuffling, reservoir sampling, and Monte Carlo methods, with TypeScript implementations and practical applications.
925 words
|
5 minutes
Recursion: The Art of Breaking Down Problems from the Top
Understand the three essential elements of recursion (base case, recurrence relation, return value), master tail recursion optimization and memoized search, and implement classic recursive algorithms in TypeScript.
839 words
|
4 minutes
Recursive Traversal: A Complete TypeScript Guide to Preorder, Inorder, and Postorder
Master recursive and iterative implementations of binary tree preorder, inorder, and postorder traversal, understand the O(1) space optimization of Morris traversal, and implement all variants in TypeScript.
808 words
|
4 minutes
Shortest Paths: TypeScript Implementations of Dijkstra, Bellman-Ford, and Floyd
Master the principles and TypeScript implementations of three classic shortest path algorithms, and understand when to use each (non-negative weight graphs, negative weight edges, multi-source).
1137 words
|
6 minutes