Pls check the code its giving wrong answer

Hello @sneha23 can you explain your logic till then so it will be way easy to check for error.

yes
i have maintaine four pointer for the beginning and end of even and odd numbers
kept them separately and lastly merged the pointer oddend with evenstart when odd number end and marked even end as null

@sneha23 i have corrected your code and commented the mistake:

oh alright thankyou so much!!

@sneha23 if you feel that your doubt is cleared you can mark this as resolved.
Happy Learning!!