Generating sub sequences

i am not able to generate the output as desired. help me in my code link: https://ide.codingblocks.com/s/172140

Hello @ankit152

Why are you reversing the string in Line 22
There is no need to do so
Just remove Line 22 and you are good to go.

i removed the reverse() before. by not doing reverse i am having output: a b ab c ac bc abc d ad bd abd cd acd bcd abcd

i removed the reverse() before. by not doing reverse i am having output: a b ab c ac bc abc d ad bd abd cd acd bcd abcd but the required ouput is: d c cd b bd bc bcd a ad ac acd ab abd abc abcd

@ankit152

Here is the modified code