✅ EZ Python || DFS
\nclass Node:\n    \n    \n    def __init__(self, n):\n        self.n = n\n        self.left = None\n        self.right = None\n\nclass Solution:\n    def count
```\nclass Node:\n    \n    \n    def __init__(self, n):\n        self.n = n\n        self.left = None\n        self.right = None\n\nclass Solution:\n    def countHighestScoreNodes(self, parents: List[int]) -> int:\n        \n        MAX_COUNT = 0\n        MAX_NUM = -inf\n        TOTAL = len(parents)\n        \n        \n        nodes = {}\n        for i in range(TOTAL):\n            nodes[i] = Node(i)\n        \n        for i in range(1, TOTAL):\n            parent_node = nodes[parents[i]]\n            if parent_node.left == None:\n                parent_node.left = nodes[i]\n            else:\n                parent_node.right = nodes[i]\n        \n        \n        def dfs(node):\n            \n            nonlocal MAX_NUM\n            nonlocal MAX_COUNT\n            nonlocal TOTAL\n            \n            if not node:\n                return 0\n            \n            l = dfs(node.left)\n            r = dfs(node.right)\n            total_child = l+r\n            top = TOTAL - total_child - 1\n            \n            l_temp = l if l !=0 else 1\n            r_temp = r if r!=0 else 1\n            top_temp = top if top !=0 else 1\n            \n            count = l_temp * r_temp * top_temp\n\n            \n            if count > MAX_NUM :\n                MAX_NUM = count\n                MAX_COUNT = 1\n            elif count == MAX_NUM:\n                MAX_COUNT += 1\n            \n            return 1 + l + r \n        \n        dfs(nodes[0])\n        \n        return MAX_COUNT\n        \n```
['Depth-First Search', 'Python']