One Liner
Code\n\nclass Solution:\n    def minimumEffort(self, tasks: List[List[int]]) -> int:\n        return reduce(lambda x, y: max(x, y[0])+y[1], sorted([(tasks[i][1]
# Code\n```\nclass Solution:\n    def minimumEffort(self, tasks: List[List[int]]) -> int:\n        return reduce(lambda x, y: max(x, y[0])+y[1], sorted([(tasks[i][1]-tasks[i][0], tasks[i][0]) for i in range(len(tasks))]), 0)\n#easy to read\n\'\'\'\nclass Solution:\n    def minimumEffort(self, tasks: List[List[int]]) -> int:\n        for i in range(len(tasks)):\n            tasks[i] = tasks[i][1]-tasks[i][0], tasks[i][0]\n        tasks.sort()\n        cur = 0\n        for i in range(len(tasks)):\n            cur = max(cur, tasks[i][0])\n            cur += tasks[i][1]\n        return cur\n\'\'\'\n```
['Python3']