public class Partition { //设置两个链表头,遍历原链表,一个追加小数链表,一个追加大数链表,最后将小数链表粘到大数链表前边即为结果。(引自牛客网coder: 念闰) public ListNode partition(ListNode pHead, int x) { if(pHead == null){ return null; } ListNode smaller = new ListNode(-1); ListNode bigger = new ListNode(-1); ListNode cur = pHead, pS = smaller, pB = bigge...