Hello,
In quicksort,some partitioning algorithms separate the pivot element from the two partitions they form,so that the sort procedure looks like : (i,j : first nd last elements)
if (i>j) return;
int p=partition(i,j); 
sort(i,p-1);
sort(p+1,j);
while the others (like hoare's partitionig) place the pivot value into one of two partitions and sorting looks like :
if (i>j) return;
int p=partition(i,j); 
sort(i,p);
sort(p+1,j);
 
I couldn't understand why there is a difference.Could anybody help?
Thanks.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/algogeeks
-~----------~----~----~----~------~----~------~--~---

Reply via email to