public static ListNode partition (ListNode head, int x) {//pass
        if (head == null) return null;
        ListNode addiHead1 = new ListNode(0);
        addiHead1.next = head;
        ListNode addiHead2 = new ListNode(0);
        ListNode p1 = head;
        ListNode prev = addiHead1;
        ListNode p2 = addiHead2;
        while (p1 != null) {
            if (p1.val < x) {
                p1 = p1.next;
                prev = prev.next;
            }
            else {
                prev.next = p1.next;
                p2.next = p1;
                p1 = prev.next;
                p2 = p2.next;
            }
        }
        p2.next = null;
        prev.next = addiHead2.next;

        return null;
    }