← Back to challenges

Is Innokodakademija in the String?

PythonHardstringsvalidation

Instructions

A string contains the word "innokodakademija" if a subsequence of its characters spell "innokodakademija".

Write a function that accepts a string and returns “YES” if the string contains a subsequence of the word innokodakademija or "NO" if it does not.

Examples

innokodakademija_in_string(“eddaaabt”) ➞ “NO”

innokodakademija_in_string(“edwardisabletodoit”) ➞ “YES”

innokodakademija_in_string(“abecdfghijklmnopqrstuvwxyz”) ➞ “NO”

Notes

python3
Loading editor…
to run
Walks through the solution with reasoning and edge cases.