Python Greedy 8 Lines
\ndef minimumEffort(self, tasks):\n\tsort = sorted(tasks, key = lambda x : x[1] - x[0])[::-1]\n\tres = 0; curr = 0\n\tfor i, n in enumerate(sort):\n\t\tif curr 
```\ndef minimumEffort(self, tasks):\n\tsort = sorted(tasks, key = lambda x : x[1] - x[0])[::-1]\n\tres = 0; curr = 0\n\tfor i, n in enumerate(sort):\n\t\tif curr < n[1]:\n\t\t\tres += n[1] - curr\n\t\t\tcurr = n[1]\n\t\tcurr -= n[0]\n\treturn res\n```
[]