Even After Odd Problem(Linked List)

What is wrong with this code. Fourth testcase showing TLE.