Recursion Explained with Examples
What recursion is, how the base case and the call stack work, and how to think recursively, with tested JavaScript examples from factorial and binary search to tree traversal, permutations and memoization.
Tech lead and full-stack engineer, Bengaluru
I lead full-stack delivery for hospitality and SaaS products, from system architecture and API design to UI, third-party integrations and production deployment, across web, mobile and desktop.
What recursion is, how the base case and the call stack work, and how to think recursively, with tested JavaScript examples from factorial and binary search to tree traversal, permutations and memoization.
Put your Next.js app on the internet: connect a GitHub repository to Vercel, set environment variables, use preview deployments for every branch, add a custom domain, deploy from the CLI and roll back safely.
How a hash table turns a key into an array index, what happens when two keys collide, why the table resizes itself, and how to use JavaScript’s Map and Set to solve real problems in O(1) time.
Learn tree terminology, binary trees and binary search trees, how to insert and search in a BST, and the four ways to traverse a tree, with JavaScript code.
Understand stacks (LIFO) and queues (FIFO), implement both in JavaScript, and solve classic problems like balanced brackets and breadth-first processing.