UGC NET CS 2018-DEC Paper-2
November 15, 2023Computer-Networks
November 15, 2023UGC NET CS 2018-DEC Paper-2
|
Question 17
|
The number of substrings that can be formed from string given by “a d e f b g h n m p” is
|
10
|
|
|
45
|
|
|
56
|
|
|
55
|
Question 17 Explanation:
If we have no repetition in a string then the number of substrings can be found using the formula :
n*(n+1)/2 + 1
We have added 1 because it may include a NULL string also.
The number of substrings = 10*(11)/2 +1
The number of substrings = 56
n*(n+1)/2 + 1
We have added 1 because it may include a NULL string also.
The number of substrings = 10*(11)/2 +1
The number of substrings = 56
Correct Answer: C
Question 17 Explanation:
If we have no repetition in a string then the number of substrings can be found using the formula :
n*(n+1)/2 + 1
We have added 1 because it may include a NULL string also.
The number of substrings = 10*(11)/2 +1
The number of substrings = 56
n*(n+1)/2 + 1
We have added 1 because it may include a NULL string also.
The number of substrings = 10*(11)/2 +1
The number of substrings = 56
