I am supposed to make a function that can do the following:
function: bool subsequence(const string a1[], int n1, const string a2[], int n2)
Task:
If all n2 elements of a2 appear in a1, in the same order (though not necessarily consecutively), then return true. Return false if a1 does not contain a2 as a subsequence. (Of course, the empty sequence is a subsequence of any sequence.) Return false if this function is passed any bad arguments.
Here is what I tried and I have no idea why it won't work. Any help is appreciated!