Easy c++ Solution no priority queue
int maxStarSum(vector& v, vector>& e, int k) {\n        int n=v.size();\n        vector g[n];\n\t\t//create a graph with each row containong "values" of each no
int maxStarSum(vector<int>& v, vector<vector<int>>& e, int k) {\n        int n=v.size();\n        vector<int> g[n];\n\t\t//create a graph with each row containong "values" of each node. \n        for(auto it:e)\n        {\n            g[it[0]].push_back(v[it[1]]);//inserting value of connected node it[1] in row it[0]\n            g[it[1]].push_back(v[it[0]]);\n        }\n         //sort values of each node in decreasing order;\n        for(int i=0;i<n;i++)\n        {   \n            sort(g[i].rbegin(),g[i].rend());\n        }\n       \n        int a=INT_MIN;\n\t\t//intialise ans to min value\n        for(int i=0;i<n;i++)\n        {\n            int m=v[i]; //initalise temp max value to value of node\n\t\t\t\n            int z=k;// temp value of max numbers of node allowed\n\t\t\t\n            for(auto it:g[i])\n                //iterate graph\n            { \n                if(z==0)//k nodes selected\n                break;\n                if(it>0)//value is positive\n                {\n                    m=m+it;\n                }\n             else\n                 break;\n              \n                z--;//decrease edge count\n            }\n            a=max(a,m);\n        }\n        return a;\n        \n    }
['Graph', 'C', 'Sorting']