@@ -0,0 +1,1378 @@
+package leetcode.reverse_linked_list_ii;%0A%0Aimport common.ListNode;%0A%0Apublic class Solution %7B%0A    public ListNode reverseBetween(ListNode head, int m, int n) %7B%0A    %09if(head == null) return null;%0A    %09ListNode curRight = head;%0A    %09for(int len = 0; len %3C n - m; len++)%7B%0A    %09%09curRight = curRight.next;%0A    %09%7D%0A    %09ListNode prevLeft = null;%0A    %09ListNode curLeft = head;%0A    %09for(int len = 0; len %3C m - 1; len++)%7B%0A    %09%09prevLeft = curLeft;%0A    %09%09curLeft = curLeft.next;%0A    %09%09curRight = curRight.next;%0A    %09%7D%0A    %09if(prevLeft == null)%7B%0A    %09%09head = curRight;%0A    %09%7Delse%7B%0A    %09%09prevLeft.next = curRight;%0A    %09%7D%0A    %09for(int len = 0; len %3C n - m; len++)%7B%0A    %09%09ListNode next = curLeft.next;%0A    %09%09curLeft.next = curRight.next;%0A    %09%09curRight.next = curLeft;%0A    %09%09curLeft = next;%0A    %09%7D%0A    %09return head;%0A    %7D%0A    %0A    public static void dump(ListNode node)%7B%0A    %09while(node != null)%7B%0A    %09%09System.err.print(node.val + %22-%3E%22);%0A    %09%09node = node.next;%0A    %09%7D%0A    %09System.err.println(%22null%22);%0A    %7D%0A    %0A    public static void main(String%5B%5D args)%7B%0A    %09final int N = 10;%0A    %09ListNode%5B%5D list = new ListNode%5BN%5D;%0A    %09for(int m = 1; m %3C= N; m++)%7B%0A    %09%09for(int n = m; n %3C= N; n++)%7B%0A    %09%09%09for(int i = 0; i %3C N; i++)%7B%0A    %09%09%09%09list%5Bi%5D = new ListNode(i);%0A    %09%09%09%09if(i %3E 0) list%5Bi - 1%5D.next = list%5Bi%5D;%0A    %09%09%09%7D%0A    %09%09%09dump(new Solution().reverseBetween(list%5B0%5D, m, n));%0A    %09%09%7D%0A    %09%7D%0A    %7D%0A%7D%0A

Add java solution for 92. Reverse Linked List II