https://github.com/rapter1990/stooge-sort-example
Stooge Sort Example
https://github.com/rapter1990/stooge-sort-example
java stooge-sort
Last synced: 8 months ago
JSON representation
Stooge Sort Example
- Host: GitHub
- URL: https://github.com/rapter1990/stooge-sort-example
- Owner: Rapter1990
- Created: 2021-01-15T05:09:38.000Z (over 5 years ago)
- Default Branch: main
- Last Pushed: 2021-01-15T05:19:36.000Z (over 5 years ago)
- Last Synced: 2025-01-20T22:53:01.191Z (over 1 year ago)
- Topics: java, stooge-sort
- Language: Java
- Homepage:
- Size: 19.5 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
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
- stoogesort
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