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

Update sort.py #129

Closed dejokz closed 3 years ago

dejokz commented 3 years ago

Hoare partition has been added.

Abhijit2505 commented 3 years ago

Please add all the partitions at the same time. Don't push one by one. That just increases the complexity.

dejokz commented 3 years ago

a new commit with the updated code which is bug free has been added.

fixes made: 1)partition wasn't returning the index 2)quicksort_hoare wasn't recursively called.

dejokz commented 3 years ago

Please add all the partitions at the same time. Don't push one by one. That just increases the complexity.

do you mean using threads??

Abhijit2505 commented 3 years ago

Please add all the partitions at the same time. Don't push one by one. That just increases the complexity.

do you mean using threads??

I mean to say, if there are any other partition methods as well for the Quicksort, then please add them too in the same PR, if you don't want to add them let me know, I will merge it.

dejokz commented 3 years ago

I mean to say, if there are any other partition methods as well for the Quicksort, then please add them too in the same PR, if you don't want to add them let me know, I will merge it.

There is multi-pivot partitioning. But the main ones are the hoare and lumoto which has been added.

If multi-pivot partitioning needs to be implemented I can. Assign the task to me and I'll get working on it.

Abhijit2505 commented 3 years ago

I mean to say, if there are any other partition methods as well for the Quicksort, then please add them too in the same PR, if you don't want to add them let me know, I will merge it.

There is multi-pivot partitioning. But the main ones are the hoare and lumoto which has been added.

If multi-pivot partitioning needs to be implemented I can. Assign the task to me and I'll get working on it.

No it's alright if the main pivots are added. Merging it.