Question DSA-STR-0055
MediumHow many subsequences (including the empty one) does a string of n distinct characters have?
- A.
2ⁿ
- B.
n²
- C.
n!
- D.
n(n + 1)/2
Sign up free to see the answer and a step-by-step explanation.
Popular companies
Prepare company by company
Hiring pattern, syllabus, past questions and mocks for each company.
All companiesPractice by subject
Strings question
How many subsequences (including the empty one) does a string of n distinct characters have?
2ⁿ
n²
n!
n(n + 1)/2
Sign up free to see the answer and a step-by-step explanation.