Simple python solution, beats 100%
Transactions that cost - cachback is positive for them will add to the total debt. For other transactions that have negative cost - cashback, the only needed fi
Transactions that cost - cachback is positive for them will add to the total debt. For other transactions that have negative cost - cashback, the only needed field is the largest cost among them, as they will decrease the total debt.\n```\nclass Solution(object):\n    def minimumMoney(self, transactions):\n        """\n        :type transactions: List[List[int]]\n        :rtype: int\n        """\n        cur = maxCur = maxPositive = 0\n\n        transactions = sorted(transactions, key = lambda t: t[1])    \n\n        for tran in transactions:\n            # If entire transaction adds to debt or equals zero:\n            if tran[0] >= tran[1]:\n                cur += tran[0]\n                maxCur = max(cur, maxCur)\n                cur -= tran[1]\n            # Otherwise, keep the largest cost:    \n            else:\n                maxPositive = max(maxPositive, tran[0])\n\n\n        return max(cur + maxPositive, maxCur)    \n\n```
['Python']