Pseudo code is given below for the recursive part of the cyc…
Questions
Pseudо cоde is given belоw for the recursive pаrt of the cycle-checking аlgorithm discussed in clаss; assume the loop is completed before the loop begins. In the graph pictured below, the labels are vertex indices; observe that the graph has vertices. At what value of the current vertex will the algorithm first detect a cycle? Justify your answer by showing all work and stating any assumptions you made. private bool DFS_Cycle_Recursive(int x, int[] v, int order){ Assign v[x] = order Increment order If there exists a neighbor y of x such that y was visited earlier, but not the previous vertex visited, then return true If there exists an unvisited neighbor z of x, then call DFS_Cycle_Recursive(z, v, order), and return true if this call returned true Return false}