public static void reorderList(ListNode head){
	
		ListNode middle = getMiddle(head);
		ListNode reverse = listReverse(middle.next);
		middle.next = null;
		
		//merge the reverse with head
		ListNode dummy = new ListNode(0);
		ListNode list1 = head;
		ListNode list2 = reverse;
		int index = 0;
		while(list1!=null&&list2!=null){
			if(index%2==0){
				dummy.next = list1;
				list1 = list1.next;
			}else{
				dummy.next = list2;
				list2 = list2.next;
			}
			
			dummy = dummy.next;
			index++;
		}
		if(list1!=null){
			dummy.next = list1;
		}else{
			dummy.next = list2;
		}
		
	}