recategorized by
356 views
1 votes
1 votes

The number of possible subsequences in a string of length n are:

  1. $n^{2}$
  2. $2^{n}$ 
  3. n!
  4. n(n-1)
recategorized by

1 Answer

0 votes
0 votes

B. 2^n ...

 

The problem of counting distinct subsequences is easy if all characters of input string are distinct…..

The count is equal to nC0 + nC1 + nC2 + … nCn = 2^n...

Related questions

0 votes
0 votes
0 answers
2
Amit puri asked Dec 28, 2021
283 views
Please post the solution answer is option B.
0 votes
0 votes
0 answers
3
Amit puri asked Dec 23, 2021
467 views
The given answer is option B please post solution.
1 votes
1 votes
0 answers
4
Amit puri asked Dec 17, 2021
654 views
The answer given is XOR Gate . Please explain