Skip to content

General Tree Bottom-Up DFS

Table of Contents

3249. Count the Number of Good Nodes

1519. Number of Nodes in the Sub-Tree With the Same Label

  • LeetCode | LeetCode CH (Medium)

  • Tags: hash table, tree, depth first search, breadth first search, counting

2872. Maximum Number of K-Divisible Components

2477. Minimum Fuel Cost to Report to the Capital

2973. Find Number of Coins to Place in Tree Nodes

  • LeetCode | LeetCode CH (Hard)

  • Tags: dynamic programming, tree, depth first search, sorting, heap priority queue

2440. Create Components With Same Value

1273. Delete Tree Nodes

3004. Maximum Subtree of the Same Color

Comments