Count Good Nodes in Binary Tree Based on Root Path Values

Asked at Meta · Coding Questions · Difficulty: Easy

Given a binary tree, find all 'good' nodes. A 'good' node is defined as a node where its value is greater than or equal to all the values from the root to that node.

Loading the problem…