@@ -0,0 +1,838 @@
+/**%0A * Problem : https://leetcode.com/problems/swap-nodes-in-pairs/%0A * %0A * Definition for singly-linked list.%0A * public class ListNode %7B%0A *     int val;%0A *     ListNode next;%0A *     ListNode(int x) %7B val = x; %7D%0A * %7D%0A */%0Apublic class Solution %7B%0A    public ListNode swapPairs(ListNode head) %7B%0A        if(head == null) return head;%0A        ListNode root = new ListNode(0);%0A        ListNode next = root;%0A        do %7B%0A            ListNode node1 = head;%0A            ListNode node2 = head.next;%0A            if(node1 == null %7C%7C node2 == null) %7B%0A                next.next = node1;%0A                break;%0A            %7D%0A            node1.next = node2.next;%0A            node2.next = node1;%0A            next.next = node2;%0A            head = head.next;%0A            next = next.next.next;%0A        %7Dwhile(head != null);%0A        return root.next;%0A    %7D%0A%7D%0A

Create Swap_Nodes_in_Pairs.java