# Tag Archives: Graph Shortest Paths Quiz

## Shortest path in a complement graph

Given an undirected non-weighted graph G. For a given node start return the shortest path that is the number of edges from start to all… Read More »

## Finding shortest path between any two nodes using Floyd Warshall Algorithm

Given a graph and two nodes u and v, the task is to print the shortest path between u and v using the Floyd Warshall… Read More »

## Shortest Path with even number of Edges from Source to Destination

Given an undirected graph G, the task is to find the shortest path of even-length, given 1 as Source Node and N as Destination Node.… Read More »

## Johnson’s algorithm for All-pairs shortest paths | Implementation

Given a weighted Directed Graph where the weights may be negative, find the shortest path between every pair of vertices in the Graph using Johnson’s… Read More »

## Algorithms | Graph Shortest Paths | Question 15

Is the following statement valid?. Given a graph where all edges have positive weights, the shortest paths produced by Dijsktra and Bellman Ford algorithm may… Read More »

## Algorithms | Graph Shortest Paths | Question 14

Is the following statement valid?. Given a weighted graph where weights of all edges are unique (no two edge have same weights), there is always… Read More »

## Algorithms | Graph Shortest Paths | Question 13

Match the following Group A Group B a) Dijkstra’s single shortest path algo p) Dynamic Programming b) Bellmen Ford’s single shortest path algo q) Backtracking… Read More »

## Algorithms | Graph Shortest Paths | Question 12

Is the following statement valid about shortest paths? Given a graph, suppose we have calculated shortest path from a source to all other vertices. If… Read More »

## Algorithms | Graph Shortest Paths | Question 11

Given a directed graph where weight of every edge is same, we can efficiently find shortest path from a given source to destination using? (A)… Read More »

## Algorithms | Graph Shortest Paths | Question 10

Which of the following algorithm can be used to efficiently calculate single source shortest paths in a Directed Acyclic Graph? (A) Dijkstra (B) Bellman-Ford (C)… Read More »

## Algorithms | Graph Shortest Paths | Question 9

Following statement is true or false? If we make following changes to Dijkstra, then it can be used to find the longest simple path, assume… Read More »

## Algorithms | Graph Shortest Paths | Question 8

In a weighted graph, assume that the shortest path from a source ‘s’ to a destination ‘t’ is correctly calculated using a shortest path algorithm.… Read More »

## Algorithms | Graph Shortest Paths | Question 7

What is the time complexity of Bellman-Ford single-source shortest path algorithm on a complete graph of n vertices? (A) (B) (C) (D) Answer: (C) Explanation:… Read More »

## Algorithms | Graph Shortest Paths | Question 14

Suppose we run Dijkstra’s single source shortest-path algorithm on the following edge weighted directed graph with vertex P as the source. In what order do… Read More »

## Algorithms | Graph Shortest Paths | Question 4

In an unweighted, undirected connected graph, the shortest path from a node S to every other node is computed most efficiently, in terms of time… Read More »