Skip to content

Commit 40b1b60

Browse files
authored
Add files via upload
1 parent 0d49fb6 commit 40b1b60

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

1672. Richest Customer Wealth.cpp

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
class Solution {
2+
public:
3+
int maximumWealth(vector<vector<int>>& accounts) {
4+
int maxWealth = 0;
5+
for (const auto& customer : accounts) {
6+
int wealth = accumulate(customer.begin(), customer.end(), 0);
7+
maxWealth = max(maxWealth, wealth);
8+
}
9+
return maxWealth;
10+
}
11+
};

0 commit comments

Comments
 (0)