approach I used is to maintain 2 linked list one or odd and one for even and the join both but it gives runtime error
I also tried another approach to traverse through the array and if we encounter odd then link it with first node that is even
It will be nice if you could help me solve the error of either of these approaches(first method preferred)