Tree DFS (Recurse, Combine, Return)
If BFS is for levels, DFS is for paths and subtrees — and almost every tree DFS…
Tag
4 posts
If BFS is for levels, DFS is for paths and subtrees — and almost every tree DFS…
Thirteen problems that drill tree DFS from Lesson 13. The skill is recursion…
When a tree (or grid) problem is about levels or shortest distance, you want BFS…
Ten problems that drill the breadth-first search / level-order pattern from…