edualgo / eduAlgo

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

Quick Sort using Median of Medians Algorithm #147

Closed beekayg15 closed 3 years ago

beekayg15 commented 3 years ago

Is your feature request related to a problem? Please describe. Quick Sort algorithm is a basic fast-searching algorithm with a time complexity of O(nlogn)

Describe the solution you'd like Quick Sort is a well known algorithm used to sort an array with a NlogN time complexity. However in the worst case scenario it takes a time complexity of O(n^2) to sort an array of length N(i.e when already sorting in asc. or desc. order). Therefore the it can be combined with the median of medians algorithm(i.e to choose the best pivot) to ensure the time complexity to be O(nlogn).

beekayg15 commented 3 years ago

@Abhijit2505 I kindly request you to permit me to work on the issue. Thanks in advance.

Abhijit2505 commented 3 years ago

Quick sort is already present.