1
0
Fork 0
mirror of https://gitlab.com/mfocko/LeetCode.git synced 2024-11-09 15:59:06 +01:00

problems(kt): add “1672. Richest Customer Wealth”

Signed-off-by: Matej Focko <mfocko@redhat.com>
This commit is contained in:
Matej Focko 2023-12-04 22:19:18 +01:00
parent 66b342212f
commit 264f5c78db
Signed by: mfocko
GPG key ID: 7C47D46246790496

View file

@ -0,0 +1,6 @@
class Solution {
fun maximumWealth(accounts: Array<IntArray>): Int =
accounts.map { account ->
account.sum()
}.maxOrNull()!!
}