You're given a bidirectional weighted graph. Now you've to traverse the whole graph starting with any source making the total path length minimum.
Brute force approach will be to traverse all the permutations and give the minimum.
What should be the correct approach to solve this kind of problems?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…