Question: Consider the algorithms for merge sort, insertion sort and counting sort as discussed in class. For each of the following sets of circumstances, select which

 Consider the algorithms for merge sort, insertion sort and counting sort

Consider the algorithms for merge sort, insertion sort and counting sort as discussed in class. For each of the following sets of circumstances, select which sort would be the most appropriate choice. Base your choice on the data given without further assumptions. The sort needs to be as fast as possible. The input data Is random, and can be any 64-bit Integer. There is sufficient memory available for any of the three options. The sort needs to be as fast as possible. Valid input values are in dollars-and-cents, and never greater than $ 1,000,000.00. There is sufficient memory available for any of the three options. The sort needs to be as fast as possible. The input data is random, and can be any 64-bit integer. Memory is restricted. In terms of memory usage, the sort must be "in-place" or better (O(n) memory requirement). The amount of data to be sorted is enormous, and it Is preferable not to store the entire data set in memory. There is a straight-forward mapping of the values to be sorted to the integers values -1000 to 1000. The data are relatively stable and consist of about 100,000 items. Each night, when the users are offline, the dataset is updated to add at most 3 new data items. The data values can be considered as random integers

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!