Tag
#recursion
5 articles tagged recursion.
Binary Trees Explained: Traversals, Height, and Why In-Order Is Sorted
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.
Dynamic Programming: Turning Exponential Recursion Into Linear Time by Remembering
The dynamic programming algorithm explained: memoization vs tabulation, optimal substructure, overlapping subproblems, the 0/1 knapsack, time complexity, and interview prep.
Recursion and Backtracking: Trusting a Smaller Version of the Problem
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: Undo, Recursion, and the O(n) Trick Interviewers Love
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.
JSON Parser LLD: Recursive Descent, Demystified in 200 Lines
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.