Back to problems

Bill Deliveries with Historical Rates and Deferred Rounding

Algorithm · Rippling · Hard

You are asked to build a billing system for a delivery service. The system maintains a set of drivers, each with a historical record of hourly rates. It records deliveries and accumulates the exact total charge before applying rounding only when queried. Implement a function delivery_billing(operations: string[][], rounding: string) -> string[] that processes each operation in order and returns an array of result strings, one per operation. Each operation is an array of…

Checking your access…