Given a directed graph having n nodes. For each node, delete all the outgoing edges except the outgoing edge with minimum weight. Apply this deletion operation for every node and then print the final graph remained where each node of the graph has at most one outgoing edge and that too with minimum weight.
Remove all outgoing edges except edge with minimum weight : https://www.geeksforgeeks.org/minimum-weighted-graph/