Recursion at general

sir, how can I think in recursion for the problems?
like in subsequence generation … I see the logic is really hard to get unless someone explain it.
sir please tell me how can I think like that ?
because if some one explain a problem , I can understand the logic, otherwise I cant.

Hello @mzk1994 in the begining you may not be able to solve recursion questions but if you do enough practice then you will definitely conquer it.
in this problem you have to think like every character has the chance from which the word can start.
then you should use for loop to give every letter a chance to construct a sequence.
Here for your reference i am attaching the code:


if you have any doubt in this you can ask here,we will discuss then.
Happy Learning!!