Question 7
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 = 0while(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}The number of pairs of players having the same nationality or the same medal.
The number of pairs of players having the same nationality and same medal.
The number of players having the same nationality and same medal.
The number of players having the different name but of same nationality.