Python sort and add
The order require the most initial money is that starting from low cashback to high cashback.\nThen we just need to count one by one to the the how much is suff
The order require the most initial money is that starting from low cashback to high cashback.\nThen we just need to count one by one to the the how much is sufficient to cover the last one.\n```\nclass Solution:\n    def minimumMoney(self, transactions: List[List[int]]) -> int:\n        transactions.sort(key = lambda x: (-x[1], x[0]))\n        v = 0\n        v += transactions[0][0]\n        for trans in transactions[1:]:\n            v += max(0, trans[0] - trans[1], trans[0] - v)\n        return v\n```
['Sorting', 'Python']