edualgo / eduAlgo

A simple python package having modules of different algorithms to use in educational purposes.
https://edualgo.github.io/documentation/
MIT License
98 stars 54 forks source link

different versions of QuickSort paritioning (Lomuto partition, Hoare partition)(SWOC) #125

Closed dejokz closed 3 years ago

dejokz commented 3 years ago

Suggest two differerent parition method The partition method implemented so far is taking the last element as the pivot point i.e Lomuto. Suggest to make two different parition and explain why Hoare performs better.

How will this impact the quicksort already in the code It will not, by default we can make it either one and additionally let the user type the string 'Hoore' as a parameter if they want this paritioning to be used.

Extra feature guide users to the necessary material for the difference and the importance of choosing the right parition (using help() like done in the previous ones)

Abhijit2505 commented 3 years ago

@dejokz please get started with the issue.