Problems
Callback's own problems and the LeetCode questions companies have been asking, in one place — pick a category, then filter by company, frequency, status, difficulty, topic, and language.
- DP on Trees30
- Array1842
- String778
- Hash Table749
- Math565
- Dynamic Programming534
- Sorting483
- Greedy401
- Depth-First Search338
- Binary Search305
- Matrix267
- Breadth-First Search261
Equalize Root-to-Leaf Sums in an N-ary Tree
Algorithms & Data Structures · Raise node values by one at a time until every root-to-leaf path has the same sum, using the fewest increments: lift each shortfall as high in the tree as it can go.
Asked on LeetCode
29 questions tagged DP on Trees · all time
- Binary Tree Maximum Path SumhardDynamic ProgrammingTreeDepth-First SearchBinary Tree+117 companies
- Diameter of Binary TreeeasyTreeDepth-First SearchBinary TreeDP on Trees12 companies
- House Robber IIImediumDynamic ProgrammingTreeDepth-First SearchBinary Tree+110 companies
- Binary Tree CamerashardDynamic ProgrammingTreeDepth-First SearchBinary Tree+19 companies
- Tree DiametermediumTreeDepth-First SearchBreadth-First SearchGraph Theory+27 companies
- Sum of Distances in TreehardDynamic ProgrammingTreeDepth-First SearchGraph Theory+16 companies
- Distribute Coins in Binary TreemediumTreeDepth-First SearchBinary TreeDP on Trees6 companies
- Maximum Sum BST in Binary TreehardDynamic ProgrammingTreeDepth-First SearchBinary Search Tree+25 companies
- Find Leaves of Binary TreemediumTreeDepth-First SearchBinary TreeDP on Trees4 companies
- Binary Tree Longest Consecutive SequencemediumTreeDepth-First SearchBinary TreeDP on Trees4 companies
- Smallest Subtree with all the Deepest NodesmediumHash TableTreeDepth-First SearchBreadth-First Search+44 companies
- Lowest Common Ancestor of Deepest LeavesmediumHash TableTreeDepth-First SearchBreadth-First Search+44 companies
- Number of Good Leaf Nodes PairsmediumTreeDepth-First SearchBinary TreeDP on Trees3 companies
- Longest Univalue PathmediumTreeDepth-First SearchBinary TreeDP on Trees3 companies
- Minimum Time to Collect All Apples in a TreemediumHash TableTreeDepth-First SearchBreadth-First Search+13 companies
- Diameter of N-Ary TreemediumTreeDepth-First SearchDP on Trees3 companies
- Most Frequent Subtree SummediumHash TableTreeDepth-First SearchBinary Tree+13 companies
- Binary Tree Longest Consecutive Sequence IImediumTreeDepth-First SearchBinary TreeDP on Trees3 companies
- Count Nodes With the Highest ScoremediumArrayTreeDepth-First SearchBinary Tree+12 companies
- Largest BST SubtreemediumDynamic ProgrammingTreeDepth-First SearchBinary Search Tree+22 companies
- Count Univalue SubtreesmediumTreeDepth-First SearchBinary TreeDP on Trees2 companies
- Longest ZigZag Path in a Binary TreemediumDynamic ProgrammingTreeDepth-First SearchBinary Tree+12 companies
- Binary Tree TilteasyTreeDepth-First SearchBinary TreeDP on Trees2 companies
- Count Ways to Build Rooms in an Ant ColonyhardArrayMathDynamic ProgrammingTree+61 company
- Maximum Points After Collecting Coins From All NodeshardArrayDynamic ProgrammingBit ManipulationTree+31 company
- Number of Nodes in the Sub-Tree With the Same LabelmediumHash TableTreeDepth-First SearchBreadth-First Search+21 company
- Delete Tree NodesmediumArrayTreeDepth-First SearchBreadth-First Search+11 company
- Find Number of Coins to Place in Tree NodeshardDynamic ProgrammingTreeDepth-First SearchSorting+21 company
- Maximum Score After Applying Operations on a TreemediumDynamic ProgrammingTreeDepth-First SearchDP on Trees1 company
Listings only — titles, difficulty, and tags link out to LeetCode. Imported from the leetcode-company-wise-problems snapshot dated 1 June 2025. Frequency is that dataset's own relative score within a company and time range.