LetCode - 두 개의 교환 체인 테이블의 노드 - 귀속
                                            
 3653 단어  LetCode 학습
                    
LetCode - 두 개의 체인에 있는 노드
   1->2->3->4,       2->1->4->3.
코드는 다음과 같다.
# Definition for singly-linked list.
# class ListNode(object):
#     def __init__(self, x):
#         self.val = x
#         self.next = None
class Solution(object):
    def swapPairs(self, head):
        """
        :type head: ListNode
        :rtype: ListNode
        """
        #              
        if head == None or head.next == None:
            return head
        
        #1  #3           .next  head    
        next = head.next
        #2   1,3,5,7...
        head.next = self.swapPairs(next.next)
        #3 next.next  head    
        next.next = head
        #       next        head  
        return next
참조:https://blog.csdn.net/rosefun96/article/details/105407252