The Minion Game

  • + 4 comments

    Firstly, let's determine the total number of substrings possible from a 6-letter word, which can be found using the formula (n)x(n+1)/2, where n represents the length of the word. For a 6-letter word, this calculation yields 6x7/2=21 possible substrings, including repetitions.

    Now, let's consider the word "BANANA". Our task is to determine the points accumulated from its substrings.

    If a substring starts with a consonant, like "BANANA", we earn a total of 6 points from substrings such as "BANANA", "BANAN", "BANA", "BAN", "BA", and "B". These points correspond to the length of the substring minus its index.

    Similarly, if the index is 1, as in the case of substrings starting with a vowel such as "ANANA", we obtain 5 points, covering substrings like "ANANA", "ANAN", "ANA", "AN", and "A".

    By systematically analyzing substrings for each index, distinguishing between those starting with consonants and vowels, and applying the formula of length minus index to determine the points earned, we can ascertain the total points accumulated from all possible substrings of the word "BANANA".