Print all the subsequences of string which have characters not more then k


why it is taking all the charcters if there is codition

Since we have print all the sub sequences with length k, so for finding out all the subsequences we will have to go for each character and take k character out of them and then count all these subsequeces.
We do it by recursively calling the procedure and maintain the number of character covered in current subsequence.

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.