The Double-Array Sort: A Study of C++ Sorting Methods
CSEF · 2002 Mathematics & Software
Overview
Objectives/Goals For my project I developed a new sorting algorithm in c++ programming code. This sorting algorithm used a second array that represented the range of the numbers in the array (sort of like a histogram) to sort the array. My objective was to see if my new sort could sort a large array of numbers faster than any of the traditional sorting algorithms. Methods/Materials To test my new sorting meathod, I used a computer with a c++ compiler installed on it. I wrote a program in c++ that would create array that would contain ten thousand randomly generated numbers that ranged from zero to 9999. The program would then have each of the sorts (insertion, selection, bubble, shell, divide and conquer, and my double array sort) sort the array and time how long each took to sort the array. Results After conducting the expiriment, I found that my double array sort was in fact the fastest of the six sorts that I tested. The divide and conquer sort was the second fastest, while the insertion sort was the third fastest. The selection sort was in the middle, while the bubble and Shell sorts were the two slowest of the sorting meathods. Conclusions/Discussion My conclusion was that using a second array that represents the range of the numbers to sort an array of numbers does greatly increase the speed of a sorting algorithm.
Summary statement
For my project, I created a new sorting algorithm in c++ and compared it's speed to other c++ sorting algorithms.
Help received
none
Awards (1)
- Category Award
Competition history
- CSEF 2002
Resources
Related projects
CSEF · 2003
O(n) Sorting: A New, More Efficient Computer Sorting Algorithm
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 · 2002
C vs C++
CSEF · 2003
The Need for Speed: Testing the Execution Speed of Today's Popular Computer Languages
Closest projects by meaning, across every fair and year in the corpus.
Browse more like this
Source: California Science & Engineering Fair public projects