Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

please i need your help Assignment: Sorting Algorithms Due Monday, March 27 nd , 2017 Sort Teacher Selection Alley Kenny Bubble Baker, Kyle Insertion Darandri,

please i need your help

Assignment: Sorting Algorithms

Due Monday, March 27nd, 2017

Sort

Teacher

Selection

Alley Kenny

Bubble

Baker, Kyle

Insertion

Darandri, Nebal

Merge

Delperdang, Jeffrey

Quick

Nor, Mustafa

Shell

Poe, Jacob

The purpose of this presentation is to learn about one sorting algorithm how it works, how it performs Big Oh, and explain it to the audience.

You will be using/writing code to test the algorithm in action as Follows:

For a given size N for your input measure the time it takes to get result. For the same N run it at least 5 times present the average-. Lets use int you may try double also- as data type easy to generate with a random generator

What to submit

Characteristics of system used

Hardware

IDE + Any comments

Example:

Processor: Intel Core 2 DUO CPU @ 2.00GHz 2.00GHz.

RAM: 2.00GB

System Type: 64-bit Operating system

Used Visual studio 2015 Professional edition-.

Printing generated numbers from my code to the screen was time consuming. I had to eliminate that to shorten run time

To avoid the error I got about stack overflow. I could have changed the default setting of It could be done by .

Results

Note: It will take the computer a while hours may be- as N goes up to finish, be patient !

N

Time (in seconds)

10,000

100,000

1,000,000

10,000,000

100,000,000

1,000,000,000

See how high you can go

Code Used

#include #include// to use clock_t and clock() #include // to use random number generator using namespace std;

void mySort(int array[], int n)// parameters may vary { //Your code will go here }

int main() { const int sizeN = 10000 then 100000 then .; //to hold the data set size int *myArray = new int[sizeN];//Declaring an array of integers with size sizeN. //Populating the array for(int i = 0; i < sizeN ; i++) myArray[i] = rand(); //multiply by 1.35 or some other number for double type clock_t startTime = clock(); // Call you sorting function . Arguments may differ from algorithm to algorithm mySort(myArray, sizeN ); // to compute its execution duration in runtime cout << double( clock() - startTime ) / (double)CLOCKS_PER_SEC<< " seconds." << endl; return 0; }

How does the sort work?

In addition to the class presentation, describe in written using an example how your algorithm work. Lets use for that the following numbers

20, 80, 40, 25, 60, 45, 12, 7, 32

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Principles Programming And Performance

Authors: Patrick O'Neil, Elizabeth O'Neil

2nd Edition

1558605800, 978-1558605800

More Books

Students also viewed these Databases questions

Question

1. Identify and describe four individual components of competence.

Answered: 1 week ago

Question

Define Management by exception

Answered: 1 week ago

Question

Explain the importance of staffing in business organisations

Answered: 1 week ago

Question

What are the types of forms of communication ?

Answered: 1 week ago

Question

Explain the process of MBO

Answered: 1 week ago