Q16.The given pseudocode is executed using the "Olympics" table. What will `count` represent at the end of the execution? Assume all players have distinct names.
```
count = 0
while(Table 1 has more rows){
Read the first row X in Table 1
Move X to Table 2
while(Table 1 has more rows){
Read the first row Y in Table 1
Move Y to Table 3
if(X.Name != Y.Name){
if(X.Nationality == Y.Nationality and X.Medal == Y.Medal){
count = count + 1
}
}
}
Move all rows from Table 3 to Table 1
}
```
Save
Check
Details
Q16
25 Feb 2024
Q16.The given pseudocode is executed using the "Olympics" table. What will `count` represent at the end of the execution? Assume all players have distinct names.
```
count = 0
while(Table 1 has more rows){
Read the first row X in Table 1
Move X to Table 2
while(Table 1 has more rows){
Read the first row Y in Table 1
Move Y to Table 3
if(X.Name != Y.Name){
if(X.Nationality == Y.Nationality and X.Medal == Y.Medal){
count = count + 1
}
}
}
Move all rows from Table 3 to Table 1
}
```