minimum-money-required-before-transactions - Java Solution
\n# Code\njava []\nclass Solution {\n    public long minimumMoney(int[][] transactions) {\n        long res = 0, temp = 0;\n        for(int[] arr : transactions
\n# Code\n```java []\nclass Solution {\n    public long minimumMoney(int[][] transactions) {\n        long res = 0, temp = 0;\n        for(int[] arr : transactions) {\n            temp = Math.max(temp,Math.min(arr[0], arr[1]));\n            res += Math.max(arr[0] - arr[1], 0);\n        }\n       return res + temp; \n    }\n}\n```
['Array', 'Greedy', 'Sorting', 'Java']