100% beats python easy solution...
Intuition\n Describe your first thoughts on how to solve this problem. \nif the cost is greater than the cashback then store the maximum valuee in the variable 
# Intuition\n<!-- Describe your first thoughts on how to solve this problem. -->\nif the cost is greater than the cashback then store the maximum valuee in the variable large_gain\nelse store the maximum value in the variable large_cost.\n\n# Approach\n<!-- Describe your approach to solving the problem. -->\n\n# Complexity\n- Time complexity:O(n)\n<!-- Add your time complexity here, e.g. $$O(n)$$ -->\n\n- Space complexity:O(1)\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\n\n# Code\n```\nclass Solution(object):\n    def minimumMoney(self, transactions):\n        large_gain = -1\n        large_cost = -1\n        lost = 0\n        for x in transactions:\n            if x[0]>=x[1]:\n                lost += x[0] - x[1]\n                large_gain = max(large_gain, x[1])\n            else:\n                large_cost = max(large_cost, x[0])\n        return max(lost + large_gain, lost + large_cost)\n        \n```
['Python']