Skip to content

Rapter1990/Stooge-Sort-Example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 

Repository files navigation

Stooge Sort Example

  • Stooge sort is a recursive sorting algorithm with a time complexity of O(n^(log 3 / log 1.5) ) = O(n^(2.7095...)). The running time of the algorithm is thus slower compared to efficient sorting algorithms, such as Merge sort, and is even slower than Bubble sort, a canonical example of a fairly inefficient and simple sort.
    • Step 1 : If value at index 0 is greater than value at last index, swap them.
    • Step 2: Recursively,
      • Stooge sort the initial 2/3rd of the array.
      • Stooge sort the last 2/3rd of the array.
      • Stooge sort the initial 2/3rd again to confirm.
  • This java example shows how to sort an element of Java ArrayList using Stooge Sort method of Collections class.

The objective of Program

  • The program firstly assign some values including person's atttributes to its object and performs sort process in terms of each attribute title. All sort process is implemented by Turkish alphabetical order.

Files contaning in this repository

  • src
    • stoogesort
      • StoogeSortProcess.java
    • main
      • Main.java
    • model
      • Person.java
    • util
      • DefineValues.java
      • ShowProcess.java

Explaining an inforamtion of each file

Files Names Information
StoogeSortProcess.java Implementing Stooge Sort Process by Turkish alphabetical order
Person.java Defining it as a POJO
Main.java Handle with all project files to run the program
ShowProcess.java Showing all information about Person Object as output
DefineValues.java Filling its attributes into Person Object

Releases

No releases published

Packages

No packages published

Languages