Logo F2FInterview

C++ - Data Structures Interview Questions

Q   |   QA

A path in a graph is sequence of vertices such that there is an edge that we can follow between each consecutive pair of vertices.

Shortest path from vertex v to vertex w is a path for which the sum of the weights of the arcs or edges on the path is minimum.

We have a single source vertex and we seek a shortest path from this source vertex v to every other vertex of the graph. It is called single source shortest path problem.

1) AFDEH = 1 + 3 + 4 + 6 = 14
2) ABCEH. = 2+2+3+6 = 13. Shortest path is 2 one.

A tree T is a spanning tree of a connected graph G(V,E) such that
1) Every vertex of G (Graph) belongs to an edge in T and
2) The edges in T form a tree.

In order to link this F2FInterview's page as Reference on your website or Blog, click on below text area and pres (CTRL-C) to copy the code in clipboard or right click then copy the following lines after that paste into your website or Blog.

Get Reference Link To This Page: (copy below code by (CTRL-C) and paste into your website or Blog)
HTML Rendering of above code: