Quicksort for LinkList

当年微软面试题: 少了两个= null, 结果木offer public static ListNode sort(ListNode head){ if (head == null) return head; ListNode pivot = new ListNode(head.val); head = head.next; // remove pivot ListNode lessDummy = new ListNode(0); ListNode moreDummy = new ListNode(0); ListNode lessP = lessDummy; ListNode moreP = moreDummy; ListNode p = head; while (p != null){ if (p.val < […]