Richest Customer Wealth Problem

Richest Customer Wealth Problem — ExecCode Easy DSA Practice

Solve the Richest Customer Wealth problem on ExecCode. Free online easy DSA practice in Matrix. Write and run code in Java, C++, Python — no signup required to run.

Problem description

Description You are given an m x n integer grid accounts where accounts[i][j] is the amount of money the i​​​​​^​​​​​​th​​​​ customer has in the j​​​​​^​​​​​​th​​​​ bank. Your task is to compute the required answer and return the wealth that the richest customer has. A customer's wealth is the amount of money they have in all their bank accounts. The richest customer is the customer that has the maximum wealth.

Examples

Input {"accounts": [[1, 2, 3], [3, 2, 1]]}; Output 6. Input {"accounts": [[1, 5], [7, 3], [3, 5]]}; Output 10. Input {"accounts": [[2, 8, 7], [7, 1, 3], [1, 9, 5]]}; Output 17

Constraints

m == accounts.length n == accounts[i].length 1 <= m, n <= 50 1 <= accounts[i][j] <= 100

Practice Richest Customer Wealth free on ExecCode. Browse DSA problems, topic map, and placement guides.