Solution of Bytelandian Gold Coins Problem (COINS)

Hey, can anyone explain the use of map in the solution of Bytelandian gold coins?