Magic Spells

  • + 2 comments

    I tried this out yesterday and can't seem to grok the criteria for:

    "If it is a generic spell, find a subsequence of letters that are contained in both the spell name and your spell journal. Among all such subsequences, find and print the length of the longest one on a new line."

    They're definitely not continued subsequences, and I thought it would be shared letters in order but that's not right, either.

    Can anyone specify the constraint in a clear manner?