Q37Comprehension4 Marks7 Aug 2022
Passage
Let M be the adjacency matrix of the graph G given below. Based on above information, answer the given subquestions.
```
Procedure updateMatrix(P)
tempMat = M
foreach i in rows(P){
foreach k in columns(P){
if(M[i][k] == 1){
foreach j in columns(M){
if(M[k][j] == 1){
tempMat[i][j] = 1
}
}
}
}
}
return(tempMat)
End updateMatrix
```

What will be the value of B at the end of execution of pseudocode given below?
newMatrix = updateMatrix(M)
newMatrix2 = updateMatrix(newMatrix)
B = newMatrix2[0][3]
Press Enter to check.