@@ -0,0 +1,824 @@
+/**%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 partition(ListNode head, int x) %7B%0A        ListNode left = new ListNode(0);%0A        ListNode right = new ListNode(0);%0A        ListNode leftTail = left;%0A        ListNode rightTail = right;%0A        while(head != null)%7B%0A            if(head.val %3C x)%7B%0A                leftTail.next = head;%0A                leftTail = leftTail.next;%0A                head = head.next;%0A            %7Delse%7B%0A                rightTail.next = head;%0A                rightTail = rightTail.next;%0A                head = head.next;%0A                rightTail.next = null;%0A            %7D%0A        %7D%0A        leftTail.next = right.next;%0A        return left.next;%0A    %7D%0A%7D

Q86 Partition List