You are given an undirected and unweighted connected graph $G(V, E)$ for which you've been asked to find a spanning tree that has minimum diameter.
I have an idea but I'm not sure if it's a correct one. Can you give me a feedback?
let T be an empty forest of trees
for v in V
color v white
for v in (max-to-min-sort V by degree)
color v gray
for u in adj(v)
if u is white
add (v, u) to T
mark u gray
mark v black
The algorithm works on the same principal as Kruskal's algorithm for a MST.
Thank you for your time