Feature #7: Optimize Delivery Cost
Explore how to optimize delivery costs by analyzing package weights and truck size increments in Rust. Learn to implement efficient algorithms that ensure full utilization of delivery capacity while minimizing costs through cumulative sums and remainder checks. This lesson helps you develop problem-solving skills to handle real logistical challenges similar to those faced by companies like Amazon.
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 ...