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)


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