Pergunta de entrevista da empresa Casella Waste Systems

Simple algorithm problem involving a supply chain.