LeetCode 1672. Richest Customer Wealth (Java)
class Solution { public int maximumWealth(int[][] accounts) { int max=0; for(int[] i1: accounts){ int wealth = 0; for(int i2: i1){ wealth += i2; } max = Math.max(max, wealth); } return max; } }
class Solution { public int maximumWealth(int[][] accounts) { int max=0; for(int[] i1: accounts){ int wealth = 0; for(int i2: i1){ wealth += i2; } max = Math.max(max, wealth); } return max; } }