c# recursive solution
Intuition\n Describe your first thoughts on how to solve this problem. \n\n# Approach\n Describe your approach to solving the problem. \n\n# Complexity\n- Time 
# Intuition\n<!-- Describe your first thoughts on how to solve this problem. -->\n\n# Approach\n<!-- Describe your approach to solving the problem. -->\n\n# Complexity\n- Time complexity:\n<!-- Add your time complexity here, e.g. $$O(n)$$ -->\n\n- Space complexity:\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\n\n# Code\n```\npublic class Solution {\n    Dictionary<int, int[]> parentDict = new();\n    int result = 0;\n    long maxScore = 0;\n    \n    public int CountHighestScoreNodes(int[] parents) {\n        for(int i=0; i< parents.Length; i++){\n            parentDict.TryAdd(i, new int[2]);\n        }\n        for(int i=1; i<parents.Length; i++){\n            if(parentDict[parents[i]][0] == 0) parentDict[parents[i]][0] = i;\n            else parentDict[parents[i]][1] = i;\n        }\n\n        CountScores(0, parents.Length);\n        return result;\n    }\n\n    public int CountScores(int index, int totalSize){\n        int left = 0, right = 0;\n        long count =1;\n        if(parentDict[index][0] != 0) left = CountScores(parentDict[index][0], totalSize);\n        if(parentDict[index][1] != 0) right = CountScores(parentDict[index][1], totalSize);\n\n        int subTree = left + right +1;\n        int other = totalSize - subTree;\n        if(left != 0) count *= (long)left;\n        if(right != 0) count *= (long)right;\n        if(other != 0) count *= (long)other;\n        if(count == maxScore) result++;\n        else if(count > maxScore){\n            maxScore = count;\n            result = 1;\n        } \n        return subTree;\n\n    }\n}\n```
['C#']