Q3Single correct6 Marks6 May 2026
The following pseudocode is executed using the "Scores" dataset. What will the value of B represent at the end of execution?
```
D = {}, B = 0
while(Table 1 has more rows){
Read the first row X in Table 1
D = updateDictByField(D, X.Physics)
Move X to Table 2
}
B = findAKey(D)
Procedure updateDictByField(D, Value)
if(isKey(D, Value)){
D[Value] = D[Value] + 1
}
else{
D[Value] = 1
}
return(D)
End updateDictByField
Procedure findAKey(D)
Key = -1, Value = 0
foreach A in keys(D){
if(D[A] > Value){
Value = D[A]
Key = A
}
}
return(Key)
End findAKey
```
────────────────────────────────────────