leetcodeSolution to some Leetcode problems written in C++ |
git clone git://git.dimitrijedobrota.com/leetcode.git |
Log | Files | Refs | README | LICENSE |
2358.cpp (203B)
0 class Solution {
1 public:
2 int maximumGroups(const vector<int> &grades) {
3 int k = 0, total = 0;
4 while (total + k < grades.size())
5 total += ++k;
6 return k;
7 }
8 };