Write an algorithm to detect if a given undirected graph
contains a cycle.
Consider a directed acyclic graph. How many topological
orderings does it have?
3 . Compose the distance matrix for a graph
Write an algorithm for finding shor
Exam 2- 2013
For an O(n2) algorithm, one data set with input size n = 3
takes 54 seconds. How long will it take for a data set for n = 2 and n
For an O(2n) algorithm, a friend tells you that it takes 16
seconds to run her data set on a machine.