Leetcode 1672. Richest Customer Wealth
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | /** * @param {number[][]} accounts * @return {number} */ var maximumWealth = function(accounts) { let max = 0 for (i = 0; i < accounts.length; i++) { let sum = accounts[i].reduce((x, y) => x + y) if (sum > max) { max = sum } } return max }; | cs |