One more guest is coming to the birthday party. Write add_guest(guests, name) to add name to the end of the list and return the new list. The list may be empty.
add_guest({"Amy", "Bao"}, "Coco")→['Amy', 'Bao', 'Coco']add_guest({}, "Li")→['Li']vector<string> add_guest(vector<string> guests, const string &name)#include <string>
#include <vector>
using namespace std;
vector<string> add_guest(vector<string> guests, const string &name) {
// your code here: add name to the end of guests
return guests;
}
Run tries the examples. When they look right, Submit.