Gusto Interview Question

The question was basically this Leetcode question. https://leetcode.com/problems/distribute-money-to-maximum-children/description/