Share python code, easy to understand.

  • 1
    class Solution(object):
    def oddEvenList(self, head):
        :type head: ListNode
        :rtype: ListNode
        if not head or not head
        while and
            if and
            if and
        return head

Log in to reply

Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.