Available question text
Given a rooted tree of integer values, count the nodes that are "great enough" — typically meaning each node's value is at least the maximum value among its ancestors on the root-to-node path. The hard version adds large constraints and/or updates/queries, forcing you to combine tree traversal/rerooting ideas with efficient data structures (Euler tour/HLD + segment tree or similar) to maintain path maxima and counts quickly.
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 2792. Count Nodes That Are Great Enough
Reported date not specified · 0 source reports
Source snapshot: Nov 12, 2026
View source