Need to description clearer!

  • 8

    need to description clearer!
    Can the author provide more examples to describe it clearer? I don't know why those authors suppose everyone should know what they think about his question.

  • 1

    the question is to find there are how many subsequences in S(the subsequence is the same as T)

  • 0

    In the example, S="rabbbit" and T="rabbit". They say you're supposed to return 3 for that, but don't indicate what the three subsequences are.

    By their definition of subsequence, it seems like the answer should be much larger, as T has the following subsequences, all of which are in T:


    And I'm not even sure that list is complete. But, it's way more than 3. They must be using a very particular definition of 'distinct', as all of those subsequences look distinct to me.

  • 0

    I think the number of subsequences meant in the example is equivalent to 3 ways the "rabbit" string is wholly found into the "rabbbit" string.
    So the three occurrences of string t inside string s are:

    • rabb(b)it
    • ra(b)bbit
    • rab(b)bit

Log in to reply

Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.