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