EVEN-AFTER-ODD code problem

codeLink:https://pastebin.com/sup6PXJm
I am getting tle in 2 cases and wa in 1, please correct my code

@Divya_321 hey divya do one task make a function say evenodd and pass the head data into it if data is odd then insert it first else insert even after that
if(oddHead==NULL)
oddHead=evenHead;
else{
node*temp = oddHead;
while(temp->next!=NULL){
temp = temp->next;
}
temp->next = evenHead;
}
return oddHead;