Input: {{1, 2, 1}, {1, 3, 2}, {1, 4, 3}, {1, 5, 4},
{2, 3, 5}, {2, 5, 7}, {3, 4, 6}}
Output: 10
Explanation: Refer the fig…

Citymap with 5 cities and 7 damaged road
Input : {{1, 2, 1}, {1, 3, 1}, {1, 4, 100},
{2, 3, 1}, {4, 5, 2}, {4, 6, 2}, {5, 6, 2}}
Output : 106
Explanation: Minimum cost to connect all the cities is 106
Input: {{1,2,5},{2,4,2},{4,3,1},{1,3,7},{1,4,7},{3,,5,3}}
Output: 11
Explanation: Minimum cost to connect all the cities is 11