Ask your own question, for FREE!
Mathematics 22 Online
OpenStudy (jhoncena):

Write an algorithm that will decide which sorting algorithm (between bubbleSort, mergeSort and quickSort (with middle pivot)) to give the input array for sorting. Suppose I choose the following benchmarks: - Random - Nearly sorted (i.e. nearly sorted in ascending order) - Reversed (i.e. nearly sorted in descending order) - Few unique keys (i.e. contains repetitions due to few unique keys) From this benchmark set, which benchmark property constraints can hold up, in order to support the claim, for choosing either "bubbleSort", "mergeSort" or "quickSort"?

OpenStudy (unklerhaukus):

bubble sort works good for a nearly sorted list

OpenStudy (unklerhaukus):

i think merge sort would work well for a reverse order list

OpenStudy (unklerhaukus):

quick sort works well in general, but not so good if there are only a few unique keys

Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!
Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!