3 ms·
Or connect the node with the highest degree with the node with the lowest degree.
by PeterSmit 13y ago
Or connect the node with the highest degree with the node with the lowest degree.
- ajanuary 13y agoI just tried this and several times the highest degree was already connected with the lowest degree, so I either had to pick another highest degree node (if there was a tie), pick the next highest degree and connect it with the lowest degree, or pick the next lowest degree and connect it with the highest degree. They all seemed to work out okay. I find it interesting that yours appears simpler on the face of it, but has more edge cases. Seems like mine would be simpler if you were actually writing out the steps properly.
- darkmighty 13y agoNot only that but also connect the highest with greatest connectivity to the lowest with greatest connectivity to avoid "orphan" nodes.