---
title: "Discussion on \"Count Good Nodes in Binary Tree\" | Hashnode"
description: "Discussion on \"Count Good Nodes in Binary Tree\". Given a binary tree root, a node X in the tree is named good if in the path from root to X there are no nodes with a value greater than X.\nReturn the number of good nodes in the binary tree.\n# Definition for a binary tree node.\n# class TreeNode:\n#   ..."
url: "https://hashnode.com/posts/count-good-nodes-in-binary-tree/63103d9b56df9e8e5025aefb"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Count Good Nodes in Binary Tree](https://awsbuilder.hashnode.dev/count-good-nodes-in-binary-tree?utm_source=hashnode&utm_medium=feed)

Given a binary tree root, a node X in the tree is named good if in the path from root to X there are no nodes with a value greater than X. Return the number of good nodes in the binary tree. # Definition for a binary tree node. # class TreeNode: # ...

Sep 1, 2022 · 1 min read · awsbuilder.hashnode.dev  
Read the article

-   [#leetcode-solution](https://hashnode.com/tag/leetcode-solution)
-   [#python](https://hashnode.com/tag/python)
-   [#problem-solving-skills](https://hashnode.com/tag/problem-solving-skills)

## Written by

[Salah Elhossiny](https://hashnode.com/@Salah856)

@Salah856 · Egypt

  
[View profile](https://hashnode.com/@Salah856)

ML Specialist @Bullzaye.ai

AWS Community Builder, AWS ML Specialist, Full-Stack Developer

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
