Zoka
Zoka

Orz

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;
    }
}


CC BY-NC-ND 2.0 版权声明

喜欢我的文章吗?
别忘了给点支持与赞赏,让我知道创作的路上有你陪伴。

加载中…

发布评论