leetcode

Solution to some Leetcode problems written in C++
git clone git://git.dimitrijedobrota.com/leetcode.git
Log | Files | Refs | README | LICENSE

1672.cpp (256B)


0 class Solution {
1 public:
2 int maximumWealth(vector<vector<int>> &accounts) {
3 vector<int> w;
4 for (auto &v : accounts)
5 w.push_back(accumulate(v.begin(), v.end(), 0));
6 return *max_element(w.begin(), w.end());
7 }
8 };