https://www.codinginterview.net/2023/05/distribute-coins.html