Given a graph with n(<=100) vertices and m( <=n(n-1)/2 ) edges, you are asked to find a spanning tree with the minimum difference between the biggest and the smallest edge of the tree.↵
↵
The problem can be found [Here (UVA 1395)](https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&problem=2471). I can't figure out an efficient way to solve this. Any kind of help is appreciated. ↵
↵
Update: Got AC using [user:i_love_fake123,2019-08-10]'s approach. [this](http://ideone.com/m5o0ut) is my code if anyone is interested.
↵
The problem can be found [Here (UVA 1395)](https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&problem=2471). I can't figure out an efficient way to solve this. Any kind of help is appreciated. ↵
↵
Update: Got AC using [user:i_love_fake123,2019-08-10]'s approach. [this](http://ideone.com/m5o0ut) is my code if anyone is interested.