Q16.What is the value of resultDict at the end of the execution of the following pseudocode?
```
Procedure createFrequencyDict(aList)
freqDict = {}
foreach a in aList {
if (isKey(freqDict, a)) {
freqDict[a] = freqDict[a] + 1
}
else {
freqDict[a] = 1
}
}
return (freqDict)
End createFrequencyDict
A = [3, 5, 3, 7, 8, 5, 3, 8, 8, 9, 5, 3]
resultDict = createFrequencyDict(A)
```
Save
Check
Details
Q16
16 Mar 2025
Q16.What is the value of resultDict at the end of the execution of the following pseudocode?
```
Procedure createFrequencyDict(aList)
freqDict = {}
foreach a in aList {
if (isKey(freqDict, a)) {
freqDict[a] = freqDict[a] + 1
}
else {
freqDict[a] = 1
}
}
return (freqDict)
End createFrequencyDict
A = [3, 5, 3, 7, 8, 5, 3, 8, 8, 9, 5, 3]
resultDict = createFrequencyDict(A)
```