accounts[i][j] is the amount of money customer i has in bank j. Return the wealth of the richest customer, where wealth is the sum of their row.
accounts[i][j]
i
j
accounts = [[1,2,3],[3,2,1]]
6
Why
Both customers have 6.
accounts = [[1,5],[7,3],[3,5]]
10
1 <= accounts.length, accounts[i].length <= 50 1 <= accounts[i][j] <= 100
Topics
Implement maximumWealth in the editor and return the answer — printing it is never graded.
maximumWealth
Problem 53 of 1146 in the arena