GATE CS 2014, set 3 · Question 23 · Algorithms · Numerical answer (NAT) · 1 mark · no negative marks

Suppose depth first search is executed on the graph below starting at some unknown vertex. Assume that a recursive call to visit a vertex is made only after first checking that the vertex has not been visited earlier. Then the maximum possible recursion depth (including the initial call) is ______.

Undirected graph with 21 unlabelled vertices. On the left is a full 3x3 grid of 9 vertices: each vertex is joined to its horizontal and vertical neighbours (12 edges in total). The bottom-right vertex of the left grid is joined by a horizontal edge to a connector vertex on the bottom row between the two grids. This connector vertex has a vertical edge up to a pendant vertex of degree 1. The connector vertex is also joined by a horizontal edge to the bottom-left vertex of a second full 3x3 grid of 9 vertices on the right, again with 12 edges joining horizontal and vertical neighbours. The midd…
Answer

Answer 19

Answer from the official GATE CS 2014 answer key.

The step-by-step solution, where available, is part of GATE CS Pro. See what Pro includes