O(n) Sorting: A New, More Efficient Computer Sorting Algorithm
CSEF · 2003 Mathematics & Software
Overview
Objectives/Goals In this project, a new sorting algorithm was created using the language of C++. This sort would sort numbers digit by digit (by the one's space, then ten's space...) instead of as a whole. My goals were for this sort to run more efficiently (sort numbers faster) than any other sorting algorithm, and to have it run with an efficiency of O(n), which was previously said to be impossible. Methods/Materials To test the sort, I wrote a program in C++ that would have my new algorithm and five other commonly used sorting algorithms (insertion sort, selection sort, shell sort, bubble sort, and the quicksort) sort random arrays of numbers. The arrays of numbers would range in length from 10000 to 100000 numbers. The program would be run ten times for each size array (100 times total) to get accurate readings. Results My results were that the new sorting algorithm that I developed did run faster than all the other sorting algorithms that I tested it against. The quicksort was the next fastest, then the insertion sort, the selection sort, then the shell and bubble sorts. Conclusions/Discussion My conclusion was that my sort ran faster than all of the other sorting algorithms. I also concluded that it did run with an efficiency of O(n). Since the new sort only needed to make the same number of passes through the array regardless of it's size, that mathmatically proves it to be an O(n) sorting algorithm.
Summary statement
I developed a new, faster computer sorting algorithm in C++.
Help received
I had no help with this project.
Competition history
- CSEF 2003
Resources
Related projects
CSEF · 2002
The Double-Array Sort: A Study of C++ Sorting Methods
CSEF · 2007
Awesome Algorithms
CSEF · 2011
Sorting Algorithms
CSEF · 2003
The Battle of the Titans: Empirical Comparison of Sorting Algorithm Processing on Major Operating Systems
ISEF · 2014
Parallel Sorting Algorithms in C Using Open Multi-Processing
CSEF · 2008
The Efficiency of Prime-Testing Algorithms
CSEF · 2009
Efficient True Random Number Generation
CSEF · 2015
Devising an Effective Way of Solving the Rubiks Cube
Closest projects by meaning, across every fair and year in the corpus.
Browse more like this
Source: California Science & Engineering Fair public projects