Alloy Production
Problem Overview
- Find the maximum number of alloy units from n metals with fixed per-unit composition, given current stock and a purchase budget.
- Inputs: composition[n], stock[n], cost[n], budget; output: integer max units.
- Supplier has infinite supply; purchases are limited by budget and per‑unit costs; constraints up to n=1e5 and values to 1e9.
- Real-world context: foundry manufacturing; asked in Mathworks interviews and used as a coding interview problem and interview question.
Example
Unlock to view complete problem details
and practice with sample input/output
Was this article helpful?
View Test Cases & Run Code requires membership
Input Variables
Execution Result:
