LeetCode - Problems - Algorithms - 1672. Richest Customer Wealth
Problem Description
You are given an m x n integer grid accounts where accounts[i][j] is the amount of money the ith customer has in the jth 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:
Constraints:
My Solution (Python)
class Solution:
def maximumWealth(self, accounts):
accounts = [sum(wealth) for wealth in accounts]
return max(accounts)
'Problem solving > Algorithms' 카테고리의 다른 글
[LeetCode] 1108. Defanging an IP Address (Python) (0) | 2021.01.10 |
---|---|
[LeetCode] 1431. Kids With the Greatest Number of Candies (Python) (0) | 2021.01.09 |
[LeetCode] 1480. Running Sum of 1d Array (Python) (0) | 2021.01.09 |
An array of divisible numbers (나누어 떨어지는 숫자 배열) (0) | 2020.09.10 |
Finding prime numbers (소수 찾기) (0) | 2020.08.28 |