Permutation-and-Combination
Question 1 |
The number of substrings (of all lengths inclusive) that can be formed from a character string of length n is
n | |
n2 | |
n(n-1)/2 | |
n(n+1)/2 |
Question 1 Explanation:
No. of substrings of length
n = 1
(n-1) = 2
(n-2) = 3
So, Total = n(n+1)/2
n = 1
(n-1) = 2
(n-2) = 3
So, Total = n(n+1)/2