如果你面临这样的选择,你选被扎死还是被烧死?# Joke - 肚皮舞运动
j*y
1 楼
Given a string S and a string T, count the number of distinct subsequences
of T in S.
A subsequence of a string is a new string which is formed from the original
string by deleting some (can be none) of the characters without disturbing
the relative positions of the remaining characters. (ie, "ACE" is a
subsequence of "ABCDE" while "AEC" is not).
Here is an example:
S = "rabbbit", T = "rabbit"
Return 3.
不理解这个例子。那T里每个letter不都是一个subsequence了,而且都是S里的呀?就
算不同的,也不是3呀。
of T in S.
A subsequence of a string is a new string which is formed from the original
string by deleting some (can be none) of the characters without disturbing
the relative positions of the remaining characters. (ie, "ACE" is a
subsequence of "ABCDE" while "AEC" is not).
Here is an example:
S = "rabbbit", T = "rabbit"
Return 3.
不理解这个例子。那T里每个letter不都是一个subsequence了,而且都是S里的呀?就
算不同的,也不是3呀。