New
ML System Design & SQL tracks just landed
See what's new
×
Question Bank
Pricing
Blog
Forum
HOT
JobRadar
NEW
Referral
Description
Solution
Discussion
Submissions
Ask AI
Question Bank
Stripe
Coding Question
AI Insights
Quick Summary
Identify the cheapest build option for each factory independently.
Sum these individual minimums to calculate the total minimum cost.
The input is a 2D list where each row represents a factory's available options.
What This Tests
Independent subproblem decomposition
Local vs global optimization
Efficient array traversal
Greedy decision making
Common Patterns
Greedy
Collapse
Hint 1
Hint 2
Hint 3
What Interviewers May Ask Next
Ask AI Assistant
Ask AI Assistant
Ask me anything about this coding question!
Qwen
Qwen3.6-Flash
0/2000
Auto
Debug
Run
Submit
Test Cases
Input
Output
Expected