#1448

Count Good Nodes in Binary Tree

medium· Treesruns: 0

Given the root of a binary tree, a node X is named good if no node on the path from the root to X has a value greater than X's value. Return the number of good nodes in the binary tree.

sign in to paste and practice your own solution
desktop only

codedrill is a typing game and needs a real keyboard. open this on a laptop or desktop to practice.

you can still browse problems and sections from your phone.