All indices probelm

codeLink: https://pastebin.com/wvLw99Ax
why I am not getting any output for the code , as I think my solution so should yield correct output

Hi @Divya_321
Basically you are making a small mistake as you have to pass vector b by reference as you are pushing elements in that vector.

void rec(vector a , vector &b, int i, int key)

You just have to add &.

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.