Can u plz tell why this code is giving simliar output twice or how can sort these vectors lexicographically?

In this question, you do not have to consider the duplicate combinations. For that you have to maintain a check in the recursive function. Also you will get the sorted combination if you first sort the array and then send it to the recursive function.
Refer this

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.