# I really need an explanation on this

**URL:** <https://forum.codewithmosh.com/t/i-really-need-an-explanation-on-this/7894>\
**Category:** Data Structures\
**Created:** [October 12, 2021, 9:41am UTC](https://forum.codewithmosh.com/t/i-really-need-an-explanation-on-this/7894 "2021-10-12T09:41:57Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![King\_David](https://avatars.discourse-cdn.com/v4/letter/k/eb9ed0/32.png) [@King\_David](https://forum.codewithmosh.com/u/King_David)\
**Post date:** [October 12, 2021, 9:41am UTC](https://forum.codewithmosh.com/t/i-really-need-an-explanation-on-this/7894/1 "2021-10-12T09:41:57Z")

</div>

![image](https://us1.discourse-cdn.com/flex020/uploads/codewithmosh/original/2X/d/d41c76724f2ac33c93e8e46dd11221c426960995.png)

---

<div class="post-metadata">

**Author:** ![some\_random\_coder](https://avatars.discourse-cdn.com/v4/letter/s/3be4f8/32.png) [@some\_random\_coder](https://forum.codewithmosh.com/u/some_random_coder)\
**Post date:** [October 16, 2021, 12:50am UTC](https://forum.codewithmosh.com/t/i-really-need-an-explanation-on-this/7894/2 "2021-10-16T00:50:02Z")

</div>

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.
