What’s inside.
Each chapter has a complete program to run, the time and memory cost, and exercises.
- 00
Install Node.js and prepare your workspace
Set up a current LTS release of Node.js, an editor and a terminal.
- 01
JavaScript foundations for DSA
The reliable core: values, variables, functions, loops, arrays and comparisons.
- 02
Arrays, maps and sets
The everyday storage tools, and how to choose among them.
- 03
Strings and Unicode
Why string indexes are UTF-16 code units, and how to handle characters correctly.
- 04
Objects and references
Group fields into nodes and records, and reason about shared, mutable objects.
- 05
Recursion
Base cases, smaller instances, and the stack space every call uses.
- 06
Stacks and queues
The two ordering rules behind DFS, BFS, bracket checking and scheduling.
- 07
Linked lists
Nodes joined by references, and the cost of reaching an element.
- 08
Hash tables and JavaScript maps
Find a value by key without scanning, using Map for counting and membership.
- 09
Trees and binary search trees
Traverse a tree, insert and search a BST, and see why “binary” does not mean fast.
- 10
Heaps and priority queues
Serve the most urgent item first with a compact binary heap.
- 11
Searching and sorting
Linear and binary search, a predictable merge sort, and JavaScript’s default sort trap.
- 12
Two pointers, sliding windows and prefix sums
Reuse work across an array, with half-open ranges and safe sums.
- 13
Divide and conquer and backtracking
Combine answers to subproblems, or explore and undo choices.
- 14
Graph traversal
Represent a graph with Map and Set, run BFS and DFS, and recover a shortest path.
- 15
Greedy algorithms
Prove when a locally attractive choice is globally optimal.
- 16
Dynamic programming
Turn repeated subproblems into a table with explicit states and transitions.
- 17
Mixed practice and projects
Choose a technique without a chapter title to help, and build a small dependency planner.