Questions
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 wealthiest customer’s wealth.
A customer’s wealth is the sum of the amounts of money they have in all their bank accounts. The richest customer is the customer with the maximum wealth.
Solution
class Solution:
def maximumWealth(self, accounts: List[List[int]]) -> int:
return max([sum(acc) for acc in accounts])