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 Mathematics & Software · Entry S1217

Resources

Related projects

Closest projects by meaning, across every fair and year in the corpus.

Browse more like this

Source: California Science & Engineering Fair public projects

Save projects to your library

Sign in with Google to keep track of projects you find interesting, organized into folders. An account also raises your daily allowance for “Has this been done?”, and lets you create a key for the MCP server with a much higher limit than anonymous use. Browsing stays public.

Continue with Google