Q21.The following pseudocode is executed using the "Library" dataset. What will `count` represent at the end of execution of the above pseudocode?
```
A = 0, count = 0
while(Table 1 has more rows){
Read the first row X from Table 1
if(X.Year > A){
A = X.Year
}
Move X to Table 2
}
while(Table 2 has more rows){
Read the first row Y from Table 2
if(Y.Year != A){
count = count + 1
}
Move Y to Table 1
}
```
Save
Check
Details
Q21
7 Jul 2024
Q21.The following pseudocode is executed using the "Library" dataset. What will `count` represent at the end of execution of the above pseudocode?
```
A = 0, count = 0
while(Table 1 has more rows){
Read the first row X from Table 1
if(X.Year > A){
A = X.Year
}
Move X to Table 2
}
while(Table 2 has more rows){
Read the first row Y from Table 2
if(Y.Year != A){
count = count + 1
}
Move Y to Table 1
}
```