Every distinct nonempty substring can be sold once. Compute how many different substring designs the bazaar can offer, even for a very long inscription. Input: one lowercase string. Output number of distinct nonempty substrings.
Example 1:
Example 2:
Example 3:
Constraints:
1≤length≤200000.
Tags:
