今天的笔记包含基于树的深度优先搜索(Tree Depth-First Search)类型下的6个题目,它们在leetcode上的编号和题名分别是: 112 - Path Sum 113 - Path Sum II 437 - Path Sum III 129 - Sum Root to Leaf Numbers 543 - Diameter of Binary Tree 124 - Binary Tree Maximum Path Sum 下面将根据以上顺序分别...
Level up your coding skills and quickly land a job. This is the best place to expand your knowledge and get prepared for your next interview.
/ 先序 / 后序 遍历) Greedy(贪心) Recursion / BackTrace(递归 / 回溯) Breadth-First Search(广度优先搜索) Depth-First Search(深度优先搜索) Divide and Conquer(分治法) Dynamic Programming(动态编程) Binary Search(二分查找) Graph(图) Time 二叉搜索树相关操作及其应用 文章目录 二叉搜索树 查找 递归...
depth-first search (84/top100) 98 validate binary search tree 101 symmetric tree 104 maximum depth of binary tree 200 number of islands 394 decode string 494 target sum From wiki: DFS is an algorithm for traversing or searching tree or graph data structures. The algorithm starts at the root...