I love python. It makes everything so easy to write
\n0class Solution:\n    def minimumEffort(self, tasks: List[List[int]]) -> int:\n        ret = 0\n        dict1 = {}\n        for i in range(0, len(tasks)):\n  
```\n0class Solution:\n    def minimumEffort(self, tasks: List[List[int]]) -> int:\n        ret = 0\n        dict1 = {}\n        for i in range(0, len(tasks)):\n            dict1[i] = tasks[i][1]-tasks[i][0]\n        for k,v in sorted(dict1.items(), key=lambda item: item[1]):\n            if tasks[k][0] + ret < tasks[k][1]:\n                ret = tasks[k][1]\n            else:\n                ret = tasks[k][0] + ret\n        return ret \n```
[]