38.5k views
1 vote
An large automotive store maintains a list of 50000 parts that are either available in the store or ready to be ordered. The list is ordered by item number. Every so often a supplier discontinues some parts or adds some new ones. Once a week the list is updated and typically a few dozen items are added or removed. After the update the list needs to be re-sorted.

Which sorting algorithms should be used if performance (speed) is the primary concern?

a. insertion sort

b. selection sort

c. heap sort

d. merge sort

e. quick sort

1 Answer

3 votes

Answer:

e. quick sort

Step-by-step explanation:

Quick sort algorithm should be used if performance(speed) is the primary concern because the average time complexity of quick sort is O(n log n) and even O(n^2) in worst case.

This will facilitate speed and enable effectiveness and efficiency.

Their primary concern towards the sorting algorithm to be used will quickly be solved applying a quick sort algorithm.

User Thanikkal
by
5.6k points