Let an undirected graph $G=(V,E)$ with the color property $c(e)$ for every edge (could be black or white) and a weight property $1 \le w(e) \le 100$. Find the MST from the set of all spanning trees with the maximum number of white edges. Do it in linear time ($O(|V|+|E|$).
So basically I want to utilize Prim's algorithm; Suppose the heaviest weight of all white edges is $WMAX$ then we can add this value for every black edge's weight. Now, white edges will be prioritized over black edges.
Now, Prim's algorithm complexity time is defined by it's priority queue implementation. Therefore, I need to use an array of lists (I guess) with a fixed size.
We can maintain a pointer to the minimum value so extraction could be done in $O(1)$ but what about the
How should I implement the priority queue in order to keep it linear?