diptangsu / diptangsu/Sorting-Algorithms
Optimised QuickSort
- Dominant language
- Java
- Stars
- 171
- Forks
- 165
- PR merge metrics
- No merged PRs in 30d
Description
The **two way partition Quick Sort** have a worst case complexity of O(n^2) when there is duplicates element in the list. This can be optimised by **_3 way partition._** In this all the element left of pivot element is small while the centered elements are equal to pivot element and right portion of list contain greater than pivot element.
Contributor guide
Research direction
Locate the Java QuickSort implementation and any existing tests in the repository, then reproduce the duplicate-heavy worst case described in the issue. Compare the current two-way partition behavior with the requested three-way partition; done means duplicate elements are handled correctly and the relevant tests pass.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- tooling
- Issue type
- Refactor
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100