Given a disconnected graph G with N vertices and M edges and cost[] for all the vertices, the task is to add edges to G to make it connected and to add Read more →
Graph
2 postsGiven a weighted directed graph consisting of N nodes and M edges, the task is to find the first K shortest distances between two nodes A and B. (Assuming there are k Read more →