Count Subsequences

I know how to make subsequences but I am unable to get approach for this question.

Hi Lakshay , for this question you have to find the count of subsequence of a given string . So when you are printing subsequence , instead you store it in a ‘set’ . And after that you can print the length of set . By this your same subsequence will be eliminated as Set has a property of storing unique elements only.

Hey Lakshay, as you are not responding to this thread, I am marking your doubt as Resolved for now. Re-open it if required.

Please mark your doubts as resolved in your course’s “ Ask Doubt ” section, when your doubt is resolved.

@ashishnagpal2498 I used the same approach,but i am not getting correct output for string with length>3.

https://ide.codingblocks.com/s/68462

Here is my code.

i am getting problem to count the no of subsequence of the string how to store the output in a set as you mentioned above

i am getting problem to count the no of subsequence of the string how to store the output in a set as you mentioned above.