Richest Customer Wealth
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. 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.
Example 1
Input
accounts = [[1,2,3],[3,2,1]]Output
6Both customers have wealth 6, so both are considered the richest and the answer is 6.
Example 2
Input
accounts = [[1,5],[7,3],[3,5]]Output
10The customers have wealths 6, 10, and 8 respectively, so the 2nd customer is the richest with wealth 10.
Constraints
- m == accounts.length
- n == accounts[i].length
- 1 <= m, n <= 50
- 1 <= accounts[i][j] <= 100