NameThatSort Test Plan - -Average and Worst: O(n^2). This...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
Benjamin Smith Alex Packard NameThatSort Test Plan Testing: In order to successfully determine which algorithm is which, we will submit each one to a series of tests with varying sizes and types of data. First, we will subject them to a small number of randomly generated lists. We will gradually increases the size of this list until we can get a grasp of what the approximate run time of the function is. We will then give them an already sorted list and gradually increases its size as before. Once we have narrowed down the possibilities for each algorithm, we will subject them to the worst case of each possible algorithm. After these tests have been run, we should be able to compare our results to the known performances of the algorithms and match each sort accordingly. Algorithm Perfomance: This is the information that we will compare our results to: Bubble Sort: -Best Case: O(n). Occurs when the list is already sorted.
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Background image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: -Average and Worst: O(n^2). This can be improved when the elements are not too far from their correct positions. -Usually performs more poorly than other 0(n^2) sorts. Merge Sort:-Average and Worst Case: O(nlog(n))-Best case usually takes about half the amount of iterations as the worst case. Benjamin Smith Alex Packard Selection Sort:-O(n^2) -Generally faster than bubble sort but slower than insertion sort. Insertion Sort:-Best Case: O(n). Occurs when the list is already sorted.-Average Case: O(n^2). Faster when list is almost sorted.-Worst Case: O(n^2). Occurs when list is in reverse order.-Generally faster than selection sort. Quick Sort:-Average Case: O(nlog(n))-Worst Case: O(n^2) Mystery Sorts:-We will research other sorting algorithms whose performance seems to be similar to the mystery sorts and decide which algorithm matches each sort....
View Full Document

Page1 / 2

NameThatSort Test Plan - -Average and Worst: O(n^2). This...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online