Here is the problem definition:
A word is considered erician if it contains the letters
cin it, in that order. For example, we would say that the following words are erician: "meritocracy", "generic", "derrick", "euphoric", "heretic", and "electric", because they each contain those four letters in the correct order. The word "rice" is not erician because the four letters appear in the wrong order.
In this problem, we want you to write a more generalized function called
x_ian(x, word)that returns
Trueif all the letters of
xare contained in
wordin the same order as they appear in
This algorithm works merging the two strings together and comparing character by character to determine if "x" is contained within "word".
First of all, sorry for my bad english I'm not a native speaker but I hope you can understand this solution.