/* function ListNode(x){ this.val = x; this.next = null; } */ /** * @param lists ListNode类一维数组 @return ListNode类 */ function swap(arr,i,j){ if(i===j) return; const temp=arr[i]; arr[i]=arr[j]; arr[j]=temp; } function partition(arr,pivot,left,right){ const pivotValue=arr[pivot...