Apply Quick sort algorithm to Doubly linked list by changing nodes
问题 I need to sort the doubly linked list by using quicksort algorithm. Used recursion for sorting. And my partitioning function is same as the one we used in arrays. But I faced a hard time with tracking the current head node and tail node in each list. public void sort() { Node la = getLast(head); last = la; quickSort(head, last); } public void quickSort(Node newhead, Node newlast) { if(newhead == null || newlast == null) { return; } if(newhead == newlast) { return; } Node parti = partition