Q21Single correct5 Marks1 Sep 2024
The following pseudocode is executed using the "Scores" dataset. What will represent for a given key i ?
```
D = {}
while(Table 1 has more rows){
Read the first row X in Table 1
if(isKey(D, X.Town/City)){
if(first(D[X.Town/City]) < X.Mathematics){
D[X.Town/City] = [X.Mathematics, last(D[X.Town/City])]
}
if(last(D[X.Town/City]) > X.Mathematics){
D[X.Town/City] = [first(D[X.Town/City]), X.Mathematics]
}
}
else{
D[X.Town/City] = [X.Mathematics, X.Mathematics]
}
Move X to Table 2
}
```