Pergunta de entrevista da empresa John Deere

A hard level leetcode DP problem, something like coin change but more complicated