Question 2
The following pseudocode is executed using the "Olympics" dataset. Assume that no player won more than one medal. What will A represent at the end of execution?
A = 0while (Pile 1 has more cards) { Read the first row X in Table 1 Move X to Pile 2 while (Pile 1 has more cards) { Read the first row Y in Table 1 Move Y to Pile 3 if (X.Nationality == Y.Nationality and X.Gender ≠ Y.Gender) { A = A + 1 } } Move all cards from Pile 3 to Pile 1}Number of pairs of players having different nationality but same gender
Number of pairs of players having either same nationality or same gender
Number of pairs of players having same nationality but different gender
Number of pairs of players having same nationality and same gender