Compiling brilliance
Did you know? An LRU cache is a HashMap + a doubly-linked list → O(1) get & put.
Compiling brilliance
Did you know? An LRU cache is a HashMap + a doubly-linked list → O(1) get & put.
Tag
5 articles tagged recursion.
A diagram-first guide to the binary tree data structure: nodes, terminology, the three DFS traversals plus level-order BFS, height and time complexity, and a complete interview-ready implementation.
The dynamic programming algorithm explained: memoization vs tabulation, optimal substructure, overlapping subproblems, the 0/1 knapsack, time complexity, and interview prep.
Recursion and backtracking explained with diagrams: base case, call stack, choose-explore-unchoose, pruning, time complexity, and interview code for subsets, permutations, and N-queens.
The stack data structure (LIFO) explained: push, pop, peek in O(1), the call stack behind recursion, and the monotonic stack, with time complexity and a full implementation for your coding interview.
A low-level design walkthrough of a JSON parser: the grammar as a call graph, recursive descent with a position cursor, escape and number handling, and error messages that point.