独特的字母串(Leetcode)

时间:2018-05-22 01:58:46

标签: java substring

我试图解决这个问题(https://leetcode.com/problems/unique-letter-string/description/),虽然我无法理解问题陈述。

解释说明如下:

Input: "ABC"
Output: 10
Explanation: All possible substrings are: "A","B","C","AB","BC" and "ABC".
Evey substring is composed with only unique letters.
Sum of lengths of all substring is 1 + 1 + 1 + 2 + 2 + 3 = 10

我不明白为什么所有可能的子串中都缺少子串“AC”

由于有几个人提交了与上述解释相符的答案而没有任何问题,似乎我对子串的理解是错误的。任何人都可以帮助我理解吗?

0 个答案:

没有答案
相关问题