Available question text
For each node in a rooted tree, compute coins = 1 if its subtree has fewer than 3 nodes, otherwise the maximum product of any three distinct costs in that node’s subtree (use 0 if every such product is negative). The core challenge is efficiently aggregating per-subtree extreme cost values to evaluate the best triple for every node.
Related questions
Continue with questions that share topics or the same question type.
Sources · 1 reference
These records explain where the question appears. A company tag or candidate report does not guarantee a future interview question.
Hello Interview · 1 record
No company association
Leetcode 2973. Find Number of Coins to Place in Tree Nodes
Reported date not specified · 0 source reports
Source snapshot: Nov 12, 2026
View source