A group of children want to play a game, called UnMonopoly, where the player with the most money must give half of his/her money to the player with the least amount of money. What data structure(s) must be used to play this game efficiently, and Why?

Respuesta :

Answer:

Using max heap

Explanation:

Information of each player - Structure. Here one field should be the total value of the properties for taking comparison between the players. Information of each players - An array of the structures (property). Information of each property - structure.  Information about all property - array of the structures. Chance and also community chest cards - the queue in data structures.

We can use max heap and then the root will be children having the highest amount of money.

ACCESS MORE
ACCESS MORE
ACCESS MORE
ACCESS MORE