Q30Multiple correct6 Marks24 Dec 2023
The given pseudocode is executed using the "Words" dataset. At the end of execution A captures the frequency count of the most frequent letter in the dataset. But the pseudocode may have mistakes. Identify all such mistakes (if any). Assume that all statements not listed in the options below are free of errors.
```
D = {}, A = 0
while(Table 1 has more rows){
Read the first row X in Table 1
D = updateDictionary(D, X)
Move X to Table 2
}
foreach c in keys(D){
if(D[c] < A){
A = D[c]
}
}
Procedure updateDictionary(D, Y)
i = 1
while(i <= Y.LetterCount){
s = ith letter in Y.Word
if(not isKey(D, s)){
D[s] = D[s] + 1
}
else{
D[s] = 1
}
i = i + 1
}
return(D)
End updateDictionary
```
--- End of Question Paper ---