Skip to content

TahaOlayyan/QuickSort-Java-Implementation

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

6 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Quick Sort Algorithm πŸš€

Quick Sort is a highly efficient sorting algorithm that uses the Divide and Conquer strategy.
It works by selecting a pivot element, then partitioning the array into two parts:

  • Elements smaller than the pivot
  • Elements greater than the pivot

This process is repeated recursively until the whole array is sorted.


πŸ”₯ Key Features

  • Fast and efficient for large datasets
  • In-place sorting (requires minimal extra memory)
  • Based on recursion and partitioning

⏱ Time Complexity

Case Complexity
Best O(n log n)
Average O(n log n)
Worst O(nΒ²)

πŸ“Œ How It Works (Steps)

  1. Choose a pivot
  2. Partition elements around the pivot
  3. Recursively sort left and right partitions

🎬 Quick Sort Visualization (GIF)

Quick Sort GIF


βœ… Usage

Simply run the program to see the array before and after sorting using Quick Sort.

About

Java implementation of the Quick Sort algorithm

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages