Company: Walmart_12march
Difficulty: medium
Widget Management Problem Description A busy factory operates under a constantly shifting schedule, where the daily demand for widgets changes from one day to the next. On day i (where i ranges from 1 to N), the factory needs exactly R i widgets to keep production running smoothly. To meet these fluctuating requirements, the factory has a couple of strategies at its disposal. The first option is to produce new widgets on the spot, each at a cost of P. However, producing new widgets every day can be expensive, so the factory has also invested in a maintenance system that allows used widgets to be refurbished and reused. There are two types of maintenance available: 1. Quick Maintenance: This option promises a fast turnaround. A widget sent for quick maintenance takes m days to be ready for use again, and each widget processed this way incurs a cost of F. This option is appealing when the factory needs widgets returned quickly, but the higher cost per widget can add up over time. 2. Slow