Leetcode 1448: Count Good Nodes in Binary Tree

In this Leetcode problem, we try to count the good nodes in a binary tree, defined as node for which all the node from root to that node are not greater than the node value.

Problem statement

This problem is adapted to a recursive type solution of the depth-first-search type, because:

  1. The result for a particular node depends only on the…