public static Node returnHalfNode(Node head){
Node lastNode=head;
while(head!=null){
halfDataStack.add(head);
lastNode=lastNode.next.next;
if(lastNode==null){
return head;
}
if(lastNode.next==null){
return head.next;
}
head=head.next;
}
return head;
}