Richest Customer Wealth
给一个2d数组, 里面每组数据表示不同人的不同钱, 问最富的多少钱.
class Solution {
public int maximumWealth(int[][] accounts) {
int res = 0;
for(int[] a : accounts){
int tmp = 0;
for(int i = 0; i < a.length; i++) {
tmp += a[i];
}
res = Math.max(res, tmp);
}
return res;
}
}