Learn and practice
Guides
Worked explanations of interview problems, JavaScript behavior, and algorithm choices. Read the reasoning, inspect the code, and move into practice.
Debounce vs. throttle in JavaScript
Build both functions, compare leading and trailing calls, and test timing behavior with an interactive event timeline.
GuidesImplement Promise.all in JavaScript
Write a Promise.all implementation that preserves input order, handles empty iterables, and rejects correctly.
GuidesThe JavaScript event loop, explained with execution traces
Trace synchronous code, promise microtasks, timers, and async functions. Work through examples before checking their output.
GuidesBFS vs. DFS: choosing a graph traversal
Compare queues, stacks, shortest paths, visited sets, and memory costs with worked graph and grid examples.
GuidesBig O time and space complexity with worked examples
Analyze loops, nested work, recursion, and auxiliary memory. Learn to state assumptions and distinguish worst-case from amortized cost.
GuidesHow to explain a coding interview solution
A worked Two Sum interview: clarify the contract, develop a baseline, justify a hash map, test edge cases, and explain complexity.
GuidesImplement a JavaScript queue for BFS without repeated shift calls
Build a FIFO queue with bounded compaction, distinguish empty results from undefined values, and use it in a cyclic graph traversal.
GuidesTypeScript collections: missing values, keys, and readonly contracts
Model lookup presence explicitly, handle unchecked indexes, preserve zero and undefined, and write a typed frequency counter and graph BFS.
GuidesCount islands in Python with iterative flood fill
Solve a four-neighbor binary-grid problem with an explicit stack, visited-set and in-place variants, complexity analysis, and boundary tests.
GuidesJava PriorityQueue: top-K values, comparators, and stable ties
Retain top-K stream values, process jobs with explicit tie order, and test Java heap ranking separately from iteration and sorted output.
GuidesC++ lower_bound and upper_bound: counts, neighbors, and record ranges
Use C++ search boundaries for duplicate counts, strict predecessors and successors, and custom record keys without invalid iterator operations.
GuidesLongest unique substring in Go: bytes, runes, and Unicode
Implement rune and ASCII sliding windows, reject invalid input, preserve forward-only boundaries, and test Unicode length assumptions.
GuidesRust BFS shortest paths with borrowed graph labels
Return a shortest unweighted route using borrowed string labels, a FIFO frontier, explicit parents, and a lifetime that matches the source graph.