i have tried almost 4 approaches but not getting the correct approach
I have tried almost 4 approaches but not getting the correct approach
hello @Varun_a19
the approach is simple.
make two list from the given list . one list for all even and one list for all odd.
once u get these two list(even and odd)
add the head of even to the tail of odd list.
and update ur head with head of odd list.
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.