I really need an explanation on this

image

You are playing a game with at least 1000 players. Each player has a numeric id starting from 1.
Whenever a player meets another player, meet(i,j) is called. So, if player 1 meets player 2, then meet(1,2) is called. Now, you want to keep track of encounters and find a winner.

So, how do you keep track of each player’s encounter history and know when a player has encountered every other players?

Perhaps there are clever way to solve this but if there are no performance requirements, you can simply solve this using an array.

2 Likes