I am given an undirected connected graph with $n$ nodes, average degree $\sqrt{\log n}$, and each edge having integer weight in $\{1,..,5\}$. I am asked to describe MST algorithm which is as efficient as possible.
I read https://en.wikipedia.org/wiki/Minimum_spanning_tree about Dense Graph and Integer weights, but it seems that I cannot satisfy the conditions to apply the strategy for Dense graphs, and it is unclear to me what is the benefit of the integer weights.
I am thinking of simply applying Kruskal or Prim, but then I am not making use of the additional information that I have on the degree and the weights.
Any suggestion is appreciated.