/* A string contains the word "edabit" if a subsequence of its characters * spell "edabit". * Write a function that accepts a string and returns “YES” if the string * contains a subsequence of the word edabit or "NO" if it does not. */ // size_t find (const string& str, size_t pos = 0) const; // found=str.find("needles are small",found+1,6); std::string edabitInString(std::string str) { // return std::string::npos != str.find("edabit",0) ? "YES" : "NO"; std::string edabit = "edabit"; int position = 0; // loop through the characters of the word edabit for(int i=0;i