https://leetcode.com/problems/richest-customer-wealth/

Source


    int maximumWealth(vector<vector<int>>& accounts) {
        int maxW = 0;
        for (vi viBanks : accounts) {
            int sumW = 0;
            for (int bank_bal : viBanks) {
                sumW += bank_bal;
            }
            if (sumW > maxW) {
                maxW = sumW;
            }
        }
        return maxW;
    }

GitHub