Q35Single correct4 Marks30 Apr 2023
The following pseudocode is executed using the "Scores" dataset. What will first(D[i]) - last(D[i]) 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.TownCity)){
if(first(D[X.TownCity]) < X.Mathematics){
D[X.TownCity] = [X.Mathematics, last(D[X.TownCity])]
}
if(last(D[X.TownCity]) > X.Mathematics){
D[X.TownCity] = [first(D[X.TownCity]), X.Mathematics]
}
}
else{
D[X.TownCity] = [X.Mathematics, X.Mathematics]
}
Move X to Table 2
}
```