Question: Chris has applied a sorting algorithm A on a dataset of size N , but he is not very satisfactory with the performance. Most of

Chris has applied a sorting algorithm A on a dataset of size N, but he is not very satisfactory with the performance. Most of the time the algorithm is quite efficient but sometimes it becomes slow.
He has therefore developed another sorting algorithm B that have a very steady performance.
The performance of the two algorithms with respect to data size N is given below.
Algorithm A (usually): the time taken (in microseconds) is 300 N lg N +2000
Algorithm A (sometimes): the time taken (in microseconds) is 100 N2+100
Algorithm B (always): the time taken (in microseconds) is N2
Chris now asks you whether his algorithm is suitable for a computation task in which N is often very small (less than 50 data).
Make a suggestion based on justifications.

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!