Q56.Consider the dictionary `D` created in the previous question. What will the value of `L` represent at the end of execution of the following pseudocode?
```
A = 0, L = []
foreach i in keys(D) {
foreach j in keys(D[i]) {
B = findRange(D[i][j])
if(B == 0) {
L = L ++ [j]
}
if(B > A) {
A = B
L = [j]
}
}
}
Procedure findRange(Y)
p = first(Y), q = first(Y)
foreach k in Y {
if(k > p) {
p = k
}
if(k < q) {
q = k
}
}
return(p - q)
End findRange
```@passage
Save
Read
Check
Details
Q56
2 Apr 2023
Q56.Consider the dictionary `D` created in the previous question. What will the value of `L` represent at the end of execution of the following pseudocode?
```
A = 0, L = []
foreach i in keys(D) {
foreach j in keys(D[i]) {
B = findRange(D[i][j])
if(B == 0) {
L = L ++ [j]
}
if(B > A) {
A = B
L = [j]
}
}
}
Procedure findRange(Y)
p = first(Y), q = first(Y)
foreach k in Y {
if(k > p) {
p = k
}
if(k < q) {
q = k
}
}
return(p - q)
End findRange
```@passage