Please Add explanation part of even after odd in linked list
Even after odd in linked list
Hello Rishabh, even after odd means the nodes having odd values must be placed in front of nodes having even value. And the order of the nodes. must be preserved.
For ex. If the given input is
7
3 4 2 7 8 6 1
Then output will be
3 7 1 4 2 8 6
I hope it is clear to you. In case it is clear to you pls mark it as resolve and provide the rating as well as feedback so that we can improve ourselves.
In case there is still some confusion pls let me know, I will surely try to help you out.
Thanks 
Happy Coding !!
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.
Thank you for your reply but You explained the question. I needed the explanation of the approach. Can u please explain the approach for the above mentioned problem??
Ok @rishabh1000, you can create two linked list one that will take only even elements and one that will take only odd elements. And then add the head of the even list to the tail of the odd list. And pls check that if the sequence consists of only odd or only even elements then you need to return the sequence as it is.
Thanks, That helped 