OPP2258-“Interview question on Graph”

Below is the nice examples provided by geeksforgeeks.

1. Breadth First Search (BFS)
2. Depth First Search (DFS)
3. Shortest Path from source to all vertices **Dijkstra** 
4. Shortest Path from every vertex to every other vertex **Floyd Warshall**
5. To detect cycle in a Graph **Union Find**
6. Minimum Spanning tree **Prim** 
7. Minimum Spanning tree **Kruskal** 
8. Topological Sort
9. Boggle (Find all possible words in a board of characters)
10. Bridges in a Graph

Before programming build logic and check logic with programs and then do actual program. Helps in programming when these kinds of programs has been asked

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

Blog at WordPress.com.

Up ↑

%d bloggers like this: