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