Interval scheduling intuition
The problem could be converted into the classic greedy interval scheduling problem. Although this might not be the most optimal solution in terms of runtime, I 
The problem could be converted into the classic greedy interval scheduling problem. Although this might not be the most optimal solution in terms of runtime, I find it very helpful to gain an intuitive understanding of the problem.\n\nHere, we map the concepts in the problem into those in interval scheduling:\n* minimum_i = end time of interval i\n* minimum_i - actual_i = start time of interval i\n* interval_i must not end earlier than minimum_i\n* the problem = when does the last interval end when scheduled greedily?\n\n**The solution as interval scheduling**\n\n```\nclass Solution:\n    def minimumEffort(self, tasks: List[List[int]]) -> int:     \n        intervals = sorted([minimum_i - actual_i, minimum_i] for actual_i, minimum_i in tasks)\n        \n        for i in range(1, len(intervals)):\n            if intervals[i][0] < intervals[i-1][1]:\n                inc = intervals[i-1][1] - intervals[i][0]\n                intervals[i][0] += inc\n                intervals[i][1] += inc\n                \n        return intervals[-1][1]\n```
[]