Easy to understand Solution based on Lee215
```\nclass Solution:\n    def minimumMoney(self, transactions: List[List[int]]) -> int:\n        ans = 0\n        losing_cash_left = 0 # Cash left after losing 
```\nclass Solution:\n    def minimumMoney(self, transactions: List[List[int]]) -> int:\n        ans = 0\n        losing_cash_left = 0 # Cash left after losing transaction\n        earning_starting_cash = 0 # Cash needed to start the highest earning transaction\n        for transaction in transactions:\n            cash = transaction[0]\n            cash_back = transaction[1]\n            ans += max(0, cash - cash_back)\n            if cash - cash_back > 0:\n                losing_cash_left = max(losing_cash_left, cash_back)\n            if cash - cash_back <= 0:\n                earning_starting_cash = max(earning_starting_cash, cash)\n        return ans + losing_cash_left + max(0, earning_starting_cash - losing_cash_left)\n
[]