Q13Comprehension5 Marks28 Apr 2024
Passage
Based on the above data, answer the given subquestions.
Consider the following graph with six nodes. M is a 6 x 6 adjacency matrix corresponding to this graph. Assume that M has already been computed.
```
D = {}
L = []
D[4] = -1
D, L = searchPath(M, D, L, 4)
Procedure searchPath(graph, P, S, i)
S = S ++ [i]
foreach j in columns(graph){
if(graph[i][j] == 1 and not(isKey(P, j))){
P[j] = i
P, S = searchPath(graph, P, S, j)
}
}
return(P, S)
End searchPath
```

What will the value of L be after execution of the given pseudocode?