Leetcode 1672

Richest Customer Wealth

Table of Contents

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])

Leetcode 3146

Permutation Difference between Two Strings

Leetcode 796

Rotate String