Feature #7: Optimize Delivery Cost
Explore how to optimize delivery costs by determining if consecutive packages can be grouped to fully utilize cost thresholds. Learn to use cumulative sums and remainder theorem to solve real-world delivery logistics problems in coding interviews.
We'll cover the following...
Description
In addition to other important tasks, Amazon’s logistic division is responsible for delivering packages. They have partnered with many delivery services so that the orders can reach customers quickly. One of the carrier companies has pricing criteria; we want to use that criteria to our advantage so that we can deliver maximum packages at minimum cost. This carrier is willing to send one or more trucks for deliveries as needed, but they charge in increments of lbs. The vendor has different size truck (in increments of lbs) available. Anything below lbs costs $10. Whereas, anything between and lbs costs $20 and so on. If we ship anything less than ...