Q45Comprehension3 Marks10 Jul 2022
Passage
The following pseudocode is executed using the "Library" dataset. Assume that every author has published at least two books, and only one in a year. Based on the above data, answer the given subquestions.
```
Count = 0, C = 0, Diff = 0
while(Table 1 has more rows){
Read the first row X from Table 1
Move the row X to Table 2
while(Table 1 has more rows){
Read the first row Y from Table 1
if(X.Author == Y.Author){
Move the row Y to Table 2
}
else{
Move the row Y to Table 3
}
}
Diff = doSomething(Table 2)
if(Diff == C){
Count = Count + 1
}
if(Diff > C){
C = Diff
Count = 1
}
Delete all the rows from Table 2
Move all the rows from Table 3 to Table 1
}
Procedure doSomething(Table 2)
A = 0, B = 0
while(Table 2 has more rows){
Read the first row Z from Table 2
if(Z.Year > A){
B = A
A = Z.Year
}
if(Z.Year < A and Z.Year > B){
B = Z.Year
}
Move the row Z to Table 4
}
return(A - B)
End doSomething
```
What will `Count` represent at the end of the execution?