
You are given a 0-indexed 2D integer array transactions , where transactions[i] = [cost _i , cashback _i ] .
The array describes transactions, where each transaction must be completed exactly once in some order . At any given moment, you have a certain amount of money . In order to complete transaction i , money >= cost _i must hold true. After performing a transaction, money becomes money - cost _i + cashback _i .
Return the minimum amount of money required before any transaction so that all of the transactions can be completed regardless of the order of the transactions.
1 <= transactions.length <= 10 ^5transactions[i].length == 20 <= cost _i , cashback _i <= 10 ^9