Ctrl K

Richest Client Total

Easy
A bank keeps a table balances: row i describes client i, and balances[i][j] is how much money that client holds in their account j. A client's worth is the sum over all their accounts. Return the largest worth among all clients.
Example 1
balances=[[4, 9], [12, 1], [3, 3]] → 13

The client totals are 13, 13 and 6. The maximum is 13; it does not matter that two clients share it.

Example 2
balances=[[50], [20, 20, 20]] → 60

The first client has 50 and the second has 60, so the answer is 60.

Example 3
balances=[[7, 7, 7]] → 21

There is only one client, with a total of 21.

Constraints
  • 1 ≤ balances.length ≤ 50
  • 1 ≤ balances[i].length ≤ 50
  • 1 ≤ balances[i][j] ≤ 100
Have you seen this problem in a real interview?
Solved by0
Tried by0
Submissions0
Acceptance—
Topics
Similar problemsCrossword That Reads Both Ways EasyIsland Coastline Length EasyRepack the Tray EasyBlur the Pixels EasyPaint Bucket Tool Easy
loading Python…
Input
balances=[[4, 9], [12, 1], [3, 3]]
Expected
13

Run checks the first 3 tests in your browser. Submit checks all 78 tests on the server, hidden ones included.