← Back to challenges

Is Innokodakademija in the String?

JavaScriptHardstringsvalidation

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

innokodakademijaInString(“eddaaabt”) ➞ “NO”

innokodakademijaInString(“edwardisabletodoit”) ➞ “YES”

innokodakademijaInString(“abecdfghijklmnopqrstuvwxyz”) ➞ “NO”

Notes

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