Question 16
Let G be a connected undirected graph with n vertices represented using an adjacency matrix. In the DFS implementation given below, assume that checking whether a vertex has already been visited takes time.
What is the tightest upper bound for the worst case time complexity of DFS?
—
—
—
—