Minimum cost fulfillment

Write codeHard40 minAmazon style

Your task

You run a fulfillment network. supply[i] units sit at warehouse i; demand[j] units are needed at store j; shipping one unit from warehouse i to store j costs cost[i][j]. Total supply equals total demand. Any warehouse can ship to any store. Return the minimum total shipping cost to satisfy all demand. Constraints: 1 <= len(supply), len(demand) <= 50; 0 <= supply[i], demand[j] <= 1000; 0 <= cost[i][j] <= 1000.

Examples

min_transport_cost(supply: list[int], demand: list[int], cost: list[list[int]]) -> int
Example 1
Inputmin_transport_cost([3, 4], [2, 5], [[2, 1], [3, 2]])
Output13