DOKICODE
Study room

Linked Lists, Trees & Backtracking

Track 2 starts here, and every plan from now on leans on recursion. Linked lists and binary trees are where most people first write a function that calls itself, and backtracking extends the same idea to trying every choice and undoing it.

The five chapters go from linked lists, starting with problems like Reverse Linked List, to binary trees, general trees, backtracking, and recursion with divide and conquer. It suits anyone who wants recursion to feel routine before moving on to grids, dynamic programming and graphs.

292 problemsRating 1151–30185 Chapters
Open the study room

Want company while you work through this list? Sign in, open the study room, and your heroine will bring you the problems one at a time.

I. Linked Lists

§1.5 Leading and Trailing Pointers

ProblemRating
19. Remove Nth Node From End of ListUnrated
61. Rotate ListUnrated
1721. Swapping Nodes in a Linked List1387

§1.9 Divide-and-Conquer

ProblemRating
23. Merge K Sorted ListsUnrated
148. Sort ListUnrated

II. Binary Trees

§2.11 Inserting and Deleting Nodes

ProblemRating
701. Insert Into a Binary Search TreeUnrated
450. Delete Node in a BstUnrated
669. Trim a Binary Search TreeUnrated

§2.12 Tree DP

ProblemRating
337. House Robber IIIUnrated
968. Binary Tree Cameras2124

III. General Trees

§3.4 Work on the Way Down and Back Up

ProblemRating
3593. Minimum Increments to Equalize Leaf Paths1959
3331. Find Subtree Sizes After Changes2046

§3.6 Topological Sort on Trees

ProblemRating
310. Minimum Height TreesUnrated
2603. Collect Coins in a Tree2712

§3.9 Sliding Window on Trees

ProblemRating
3425. Longest Special Path2435
3486. Longest Special Path II2925

§3.11 Centroid Decomposition

ProblemRating
3372. Maximize the Number of Target Nodes After Connecting Trees I1927

IV. Backtracking

§4.1 Introductory Backtracking

ProblemRating
17. Letter Combinations of a Phone NumberUnrated

V. Recursion & Divide-and-Conquer

It is the first plan on Track 2; the route suggests it after Strings & Automata, but you can start here directly by picking it when you sign your study contract.

Ratings come from zerotrac's LeetCode contest ratings. Some problems have no zerotrac rating and are marked Unrated.

Open the study room