3
int findContentChildren(vector<int> &g, vector<int> &s) {5
g.end()); // sort the children's greed factors in non-decreasing order6
sort(s.begin(), s.end()); // sort the cookie sizes in non-decreasing order7
int contentChildren = 0;8
int i = 0; // pointer to the current child's greed factor9
int j = 0; // pointer to the current cookie size10
while (i < g.size() && j < s.size()) {11
if (s[j] >= g[i]) { // if the current cookie can satisfy the current12
// child's greed factor18
return contentChildren;