Home /
Expert Answers /
Computer Science /
a-ninja-word-is-a-word-which-hides-in-a-sentence-a-ninja-word-is-a-word-which-hides-in-a-sentence-pa501
(Solved): A ninja word is a word which hides in a sentence:
A ninja word is a word which hides in a sentence: ...
A ninja word is a word which hides in a sentence:
A ninja word is a word which hides in a sentence: it will appear continuously, but must be broken up by one or more spaces. For example, the word "star" is a ninja word in the phrase "best artist", but is NOT a ninja word in the phrase "twinkle twinkle little star". (Ninja words must be hidden, and thus always contain spaces). Ninja words and the sentences they appear in will always be case-insensitive. In addition, sentences may contain ninja stars (denoted with an asterisk "*"). Ninja stars can be any character, including a space. Given a list of possible ninja words, and a target sentence, return the score of the ninja words that appear in the sentence, according to the rules below.