C++ Easy Solution Using DFS
\nclass Solution {\npublic:\n    int countHighestScoreNodes(vector<int>& p) {\n        int n=p.size();\n        vector<vector<int>> child(n);\n        \n       
```\nclass Solution {\npublic:\n    int countHighestScoreNodes(vector<int>& p) {\n        int n=p.size();\n        vector<vector<int>> child(n);\n        \n        for(int i=1;i<n;i++)\n        {\n            child[p[i]].push_back(i);\n        }\n        int cnt=0;\n        long long maxi=0;\n        solve(0,child,n,maxi,cnt);\n        return cnt;\n        \n        \n    }\n    int solve(int node,vector<vector<int>>& child,int& total,long long& maxi,int& cnt)\n    {\n        int left=0;\n        int right=0;\n        for(int i=0;i<child[node].size();i++)\n        {\n            if(i==0)\n                left=solve(child[node][0],child,total,maxi,cnt);\n            if(i==1)\n                right=solve(child[node][1],child,total,maxi,cnt);\n        }\n        \n        long long curr=1;\n        if(left)\n            curr*=left;\n        if(right)\n            curr*=right;\n        if(node!=0)\n            curr*=(total -( left +right +1));\n        if(curr>maxi)\n        {\n            maxi=curr;\n            cnt=1;\n        }\n        else if(curr==maxi)\n            cnt++;\n        return left+right+1;\n    }\n};\n```\n**Upvote if this helps you :)**
['C']