public static <E extends Comparable<? super E>> Node<E> partitionList(Node<E> head, E value) {
        Node<E> oh = null;
        Node<E> ot = null;

        Node<E> h = null;
        Node<E> t = null;

        Node<E> curr = head;
        while (curr != null) {
            if (curr.data.compareTo(value) < 0) {
                if (oh == null) {
                    oh = new Node<E>(curr.data);
                    h = oh;
                } else {
                    h.next = new Node<E>(curr.data);
                    h = h.next;
                }
            } else {
                if (ot == null) {
                    ot = new Node<E>(curr.data);
                    t = ot;
                } else {
                    t.next = new Node<E>(curr.data);
                    t = t.next;
                }
            }
            curr = curr.next;
        }
        if (h != null) {
            h.next = ot;
            return oh;
        } else {
            return ot;
        }
    }