Skip to content

erenulas/QuicksortAnalysis

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

QuickSort Analysis

Different versions of quicksort algorithm was implemented. Initial version is a recursive quicksort where pivot is always selected as the first element, and this version is the one named as 'QuickSort.java'. Modifications below and their combinations was applied to get the different versions of quicksort algorithm.

  • Median of three method for pivot selection
  • Switching to insertion sort in smaller subarrays
  • Eliminating recursion

There are three types of inputs which are in ascending order, descending order. The third type is generated in such a way that the pivot divides both sides of the input array equally. Necessary lines for generating different types of inputs are in the code so you can comment out or uncomment to use the type you want.

How to Use It?

  • Import the repo.
  • Change the type and the size of the input.
  • Run and see the results!

About

Different versions of quicksort algorithm

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages