Sum it up , doubt

How can i remove duplicate combinations in my code . for ex:
for input
3
1 1 2
3

my output
1 2
1 2

expected output
1 2

my code is https://ide.codingblocks.com/s/107744

Hi
For this I would suggest you to use unordered map, check if the number you are taking is present, if yes, use it and remove it from map, this way you will not get any duplicates

@priyanka123 can you tell , another approach without using map…

Sure, you can use set too but they are almost same
But have you tried using maps first? If yes, then pass on your code first. Lets try one approach at a time?

@ejazsaifi70 Bro you can use set stl.

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.

@priyanka123 plz modify my code…