题目:
题解:
func oddEvenList(head *ListNode) *ListNode {if head == nil {return head}evenHead := head.Nextodd := headeven := evenHeadfor even != nil && even.Next != nil {odd.Next = even.Nextodd = odd.Nexteven.Next = odd.Nexteven = even.Next}odd.Next = evenHeadreturn head
}