wes d2a2ba9e15 first commit | 4 gadi atpakaļ | |
---|---|---|
.. | ||
README.md | 4 gadi atpakaļ | |
code.cpp | 4 gadi atpakaļ | |
unitTest.cpp | 4 gadi atpakaļ |
by Matt tags: strings, validation
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. Examples edabitInString(“eddaaabt”) ➞ “NO” edabitInString(“edwardisabletodoit”) ➞ “YES” edabitInString(“abecdfghijklmnopqrstuvwxyz”) ➞
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.
edabitInString(“eddaaabt”) ➞ “NO”
edabitInString(“edwardisabletodoit”) ➞ “YES”
edabitInString(“abecdfghijklmnopqrstuvwxyz”) ➞ “NO”
Check the Resources tab for more details on subsequence.