29.7k views
4 votes
Array unsortedArr contains an unsorted list of integers.

Array sortedArr contains a sorted list of integers.

Which of the following operations are NOT more efficient for sortedArr than unsortedArr? Assume the most efficient algorithms are used.

I. Searching for a given element
II. Finding the minimum
III. Inserting an element

a. Ill only
b. Il only
c. I only
d. I and II
e. I and III

User Hasanthi
by
5.6k points

1 Answer

3 votes

Answer:

a. Ill only

Step-by-step explanation:

This is because, for option III, in inserting an element, one only need the array key for the position in which to insert the element and this is irrespective of whether the array is sorted or not.

Whereas, options I and II are easier done in a sorted array than in an unsorted array.

User Turin
by
5.1k points