For a given unweighted graph find the distance between source and destination. USING C++ PROGRAMMING LANGUAGE.

If we consider a source vertex in a graph then we can calculate the distance of every vertex from the source vertex of the graph. The distance which will be given between source and destination is the shortest distance which we calculated using the binary first search algorithm in the graph. Eg. Vertex of graph:-

1-2 2-3 3-0 3-4 4-5 and if the source is 0, then the distance of vertex 0 from source is 0.

then the distance of vertex 1 from the source is 1.

then the distance of vertex 3 from the source is 1.

then the distance of vertex 2 from the source is 2.

then the distance of vertex 4 from the source is 3.

then the distance of vertex 5 from the source is 4.

Submitted by Madhavendra Krishana Gupta (Madhavendra)

- Invitation Letter with different names using Python
- Finding top k ratings in Python
- Server-Client Program for file transfer using Python
- Railway Tickets Reservation System Using C++
- E-Commerce Website built using Java, JSP, Servlets and Hibernate with Database in MySQL
- Check if a number is Magic or not in C++
- Gmail in Python using selenium
- C++ Arrays with Example

Download packets of source code on Coders Packet

## Comments