Question: Write a program to implement bubble sort , insertion sort, selection sort, merge sort and quick sort (pivot = first index) algorithms. a) Compute the

Write a program to implement bubble sort, insertion sort, selection sort, merge sort and quick sort (pivot = first index) algorithms.

a) Compute the CPU processing time for all the algorithms for varying input sizes as follows: N = 102, 103, 104, 105, and 106

b) Use a random number generator to generate the inputs. Obtain the inputs from the following input ranges: 1- 103, 1 - 106, 1 109, 1 - 1012

When I attempt to create my arrays that have numbers of large value then I can't fill them because the 10^12 digit numbers don't fit into int[]. Also I'm worried that all of my sorting algorithms won't work for these large numbers. What is a good solution to both fill my arrays that allow for large digits, and fix my sorting algorithms to work with these large numbers?

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!