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:
parent
66b342212f
commit
264f5c78db
1 changed files with 6 additions and 0 deletions
6
problems/kt/richest-customer-wealth.kt
Normal file
6
problems/kt/richest-customer-wealth.kt
Normal file
|
@ -0,0 +1,6 @@
|
|||
class Solution {
|
||||
fun maximumWealth(accounts: Array<IntArray>): Int =
|
||||
accounts.map { account ->
|
||||
account.sum()
|
||||
}.maxOrNull()!!
|
||||
}
|
Loading…
Reference in a new issue