Q18Comprehension5 Marks28 Apr 2024
Passage
Based on the above data, answer the given subquestions.
Let M be the adjacency matrix of the graph G as shown below and consider the procedure Dosomething given below.
```
Procedure Dosomething(M, q)
count = 0
foreach i in rows(M){
if(M[i][q] == 1 or M[q][i] == 1){
count = count + 1
}
}
return(count)
End Dosomething
```

What will the value of B be at the end of the execution of the pseudocode given below?
B = Dosomething(M, 4)
————————————————————————————————————————————————————————————
Press Enter to check.