Remove duplicates from a vector

question:https://codezen.codingninjas.com/practice/470/745/remove-duplicates
my code is showing unique elements but the order is different from the one given in output
https://ideone.com/xR6F0D

Hey @ayu2321
Your code is completely fine. But the question given in this problem demands the numbers as sorted. So just use map instead of unordered_map and you’ll be good to go!!

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.