Skip to content

Tag Archives: Quick Sort

QuickSort on Doubly Linked List is discussed here. QuickSort on Singly linked list was given as an exercise. Following is C++ implementation for same. The… Read More
Following is a typical recursive implementation of QuickSort for arrays. The implementation uses last element as pivot.  C++ /* A typical recursive implementation of Quicksort… Read More
Standard C library provides qsort() that can be used for sorting an array. As the name suggests, the function uses QuickSort algorithm to sort the… Read More
Following is a typical recursive implementation of Quick Sort that uses last element as pivot.   C++ // CPP code for recursive function of Quicksort #include… Read More
Stability is mainly important when we have key value pairs with duplicate keys possible (like people names as keys and their details as values). And… Read More
The answer depends on the strategy for choosing pivot. In early versions of Quick Sort where the leftmost (or rightmost) element is chosen as a… Read More