You are viewing a single comment's thread. Return to all comments →
This challenge is very misleading. The most difficult portion is not the part about inheritance; that's an afterthought. Instead, the most difficult portion is about subsequences (not even contiguous subsequences), making it way more of an algorithms problem. It took me a long time to think of a solution.
Hint for those other readers: The best you can do it O(n*m). Consider "the longest subsequence you could find" for a given (contiguous) substring of the scrollname and a given (contiguous) substring of the journal.