Becky corp needs to produce multiple products each with a given expected cost and worst case cost. For starting production of a product, you will need atleast corresponding worst case cost with you. Given two arrays with expected and worst case cost for each product, return the minimum budget to start with which allows to finish producing all products.

worstcase cost: [9, 7, 6]

expected cost: [1, 2, 5]

Output = 9

Start with budget 9 ->

(9>=9) - produce 1 - remaining = (9-1)

(8>7) - produce 2 - remaining = (8-2)

(6>=5) - produce 5 - remaining = (6-5)