Find shortest distances between every pair of vertices in a given edge weighted directed Graph.
Input:
The first line of input contains an integer T denoting the no of test cases . Then T test … Read More
Interview Questions asked in Google, Microsoft, Amazon
by Dhaval Dave
Find shortest distances between every pair of vertices in a given edge weighted directed Graph.
Input:
The first line of input contains an integer T denoting the no of test cases . Then T test … Read More
by Dhaval Dave
Knight Tour Problem : Given a chess board of size n x n, initial position of knight and final position of knight. We need to find the minimum number of steps required to reach final … Read More
by Dhaval Dave
In the mathematical field of graph theory, a spanning tree T of a connected, undirected graph G is a tree that includes all of the vertices and some or all of the edges of G.
by Dhaval Dave
In graph theory, breadth-first search (BFS) is a strategy for searching in a graph when search is limited to essentially two operations: (a) visit and inspect a node of a graph; (b) gain access to
by Dhaval Dave
Depth-first search (DFS) is an algorithm for traversing or searching tree or graph data structures. One starts at the root (selecting some arbitrary node as the root in the case of a graph) and explores