TheAlgorithms / JavaScript

Algorithms and Data Structures implemented in JavaScript for beginners, following best practices.
https://the-algorithms.com/language/javascript
GNU General Public License v3.0
32.55k stars 5.6k forks source link

feat: improve space complexity of QuickSort algorithm #1704

Open DevAnuragT opened 1 month ago

DevAnuragT commented 1 month ago

Open in Gitpod know more

Describe your change:

Improved the space complexity of the QuickSort algorithm by removing additional arrays (GREATER and LESSER) and implementing in-place partitioning using swapping.

Checklist:

codecov-commenter commented 1 month ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 84.68%. Comparing base (9010481) to head (40a9414).

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #1704 +/- ## ========================================== + Coverage 84.65% 84.68% +0.02% ========================================== Files 378 378 Lines 19744 19775 +31 Branches 2951 2952 +1 ========================================== + Hits 16715 16746 +31 Misses 3029 3029 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.