Datadog interview question

a coin exchange question leetcode easy