Getting correct output but the order is different

Do sorting, to get AC.
Or since you have right answer, you can move forward with other problems, getting same sequence isn’t that important.

Well, you shall try it yourself.
Great coders never depend on others to write their code :smile:

@Jun18APP0015
I have tried to correct my code but when i was unable to do that then i have raised this doubt and I think this platform is for helping us, if not so then there is no use of ask doubt section.

Did you try this?
Did you give me the updates then?
We are here to guide you, rather than correcting your codes for full marks. You have to do it. After all its for your practise only.

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.