1732. Find the Highest Altitude
There is a biker going on a road trip. The road trip consists of
n + 1points at different altitudes. The biker starts his trip on point0with altitude equal0.You are given an integer array
gainof lengthnwheregain[i]is the net gain in altitude between pointsiandi + 1for all (0 <= i < n). Return the highest altitude of a point.
You are given two 0-indexed integer arrays,
costandtime, of sizenrepresenting the costs and the time taken to paintndifferent walls respectively. There are two painters available:
- A paid painter that paints the
ithwall intime[i]units of time and takescost[i]units of money.- A free painter that paints any wall in
1unit of time at a cost of0. But the free painter can only be used if the paid painter is already occupied.Return the minimum amount of money required to paint the
nwalls.