why does this have an extra array when printing where am i missing out on logic?? https://ide.codingblocks.com/s/465776
Why does this have an extra array when printing where am i missing out on logic?
hello @shibangi
dont sort ur temp array , becuase u have passed temo by reference so when u sort the order in which elements are inserted will change and when u will pop back that time u will pop different element.
store temp in some other vector and then sort the vectir and then insert it in set
hello, thanks for the help and I did as you said but somehow it still misses a test case : ( any other recommendations?
check now->
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.