Sponsored
Sponsored
Use these hints if you're stuck. Try solving on your own first.
Split transactions that have cashback greater or equal to cost apart from transactions that have cashback less than cost. You will always <strong>earn</strong> money in the first scenario.
For transactions that have cashback greater or equal to cost, sort them by cost in descending order.
For transactions that have cashback less than cost, sort them by cashback in ascending order.