The fruit basket has apples, pears, plums… and basket holds one word per fruit. Write apples(basket) and use count to find how many are "apple" (capitals must match).
apples({"apple", "pear", "apple", "plum"})→2apples({})→0int apples(const vector<string> &basket)#include <algorithm>
#include <string>
#include <vector>
using namespace std;
int apples(const vector<string> &basket) {
// your code here: count "apple" with count
return 0;
}
Run tries the examples. When they look right, Submit.