Skip to content

Add QuickSort algorithm in Projects/Algorithms#500

Merged
kishanrajput23 merged 1 commit into
kishanrajput23:mainfrom
num0001:add-quicksort-algorithm
May 24, 2026
Merged

Add QuickSort algorithm in Projects/Algorithms#500
kishanrajput23 merged 1 commit into
kishanrajput23:mainfrom
num0001:add-quicksort-algorithm

Conversation

@num0001
Copy link
Copy Markdown

@num0001 num0001 commented May 21, 2026

Add QuickSort algorithm

Adds a clean implementation of QuickSort using Lomuto partitioning in Projects/Algorithms/QuickSort.java. The repo already has Heapsort but was missing Quicksort — one of the most commonly studied sorting algorithms.

Includes a main method that demonstrates sorting a small array (with negatives and zero) so users can run it directly with javac QuickSort.java && java QuickSort.

Verified output:


Before: [10, 7, 8, 9, 1, 5, -3, 22, 0]
After:  [-3, 0, 1, 5, 7, 8, 9, 10, 22]

@kishanrajput23 kishanrajput23 merged commit 024b378 into kishanrajput23:main May 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants