Problem in sub sequence?

pls go through my code is it giving the wrong answer.

hello @mehulbhandari358 if you are doung by indexing then you should store all the output in the vector then reverse the vector in the end.
https://ide.codingblocks.com/s/324863.
i hope i have cleared your doubt.
Happy Learning !!

by indexing what do you mean ?

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.