@@ -0,0 +1,2354 @@
+import org.omg.PortableServer.LIFESPAN_POLICY_ID;%0A%0Aimport java.util.List;%0A%0A/**%0A * Created by Liuxz on 2017/5/22.%0A */%0A%0Apublic class Leet92ReverseLinkedList %7B%0A    public ListNode reverseBetween(ListNode head, int m, int n) %7B%0A        if(m == n)%7Breturn head;%7D%0A        ListNode left_a, left_b, right_a, right_b;%0A        ListNode node1, node2, node3;%0A        ListNode fakeHead = new ListNode(-1);%0A        fakeHead.next = head;%0A        left_a = fakeHead;%0A        left_b = fakeHead;%0A        right_a = fakeHead;%0A        right_b = fakeHead;%0A        node1 = fakeHead;%0A        node2 = node1.next;%0A        node3 = node1.next.next;%0A        int index = 0;%0A        while(index %3C= n)%7B%0A            if (index == m-1)%7B%0A                left_a = node1;%0A                right_a = node1.next;%0A            %7D%0A            if (index == m)%7B%0A                node2 = node1.next;%0A                node3 = node1.next.next;%0A            %7D%0A            if (index == n-1)%7B%0A                left_b = node2;%0A                right_b= node3;%0A                node2.next = node1;%0A                left_a.next = left_b;%0A                right_a.next = right_b;%0A            %7D%0A            if ((index %3E= m)&&(index %3C n-1))%7B%0A                node2.next = node1;%0A                node1 = node2;%0A                node2 = node3;%0A                node3 = node3.next;%0A            %7D%0A            if(index %3C m)%7B%0A                node1= node1.next;%0A            %7D%0A            index ++;%0A        %7D%0A        return fakeHead.next;%0A    %7D%0A%0A    private void switchNode(ListNode n1, ListNode n2)%7B%0A        int temp = n1.val;%0A        n1.val = n2.val;%0A        n2.val = temp;%0A    %7D%0A%0A    public static void main(String%5B%5D args)%7B%0A        Leet92ReverseLinkedList xx = new Leet92ReverseLinkedList();%0A        ListNode head = new ListNode(1);%0A        head.next = new ListNode(2);%0A        head.next.next = new ListNode(3);%0A        head.next.next.next = new ListNode(4);%0A//        head.next.next.next.next = new ListNode(5);%0A//        head.next.next.next.next.next = new ListNode(6);%0A%0A        ListNode newHead = xx.reverseBetween(head, 1, 4);%0A        for(ListNode cur = newHead; cur != null; cur=cur.next)%7B%0A            System.out.println(cur.val);%0A        %7D%0A    %7D%0A%7D%0A%0Aclass ListNode %7B%0A      int val;%0A      ListNode next;%0A      ListNode(int x) %7B val = x; %7D%0A%0A      public String toString()%7B%0A          return String.valueOf(this.val);%0A      %7D%0A%0A %7D%0A%0A

Complete 92