You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+38Lines changed: 38 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1478,3 +1478,41 @@ const rot13 = str => {
1478
1478
---
1479
1479
1480
1480
**[⬆ Back to Top](#javascript-coding-challenges-for-beginners)**
1481
+
1482
+
## 45. Richest Customer Wealth
1483
+
1484
+
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 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. For example:
1485
+
1486
+
```
1487
+
Input: accounts = [[1,5],[7,3],[3,5]]
1488
+
Output: 10
1489
+
Explanation:
1490
+
1st customer has wealth = 6
1491
+
2nd customer has wealth = 10
1492
+
3rd customer has wealth = 8
1493
+
The 2nd customer is the richest with a wealth of 10.
0 commit comments