To determine that a item is not in an unordered array of 100

To determine that a item is not in an unordered array of 100 items, linear search must examine an average of ________ 7 10 50 100 101 When sorting an array of objects, if the values in the data member being sorted on are out of order for two objects, it is necessary to examine a different data member. swap these two data values. swap the entire two objects. swap one by-one all data members in the two objects. stop the sort. To find a value that is in an unordered array of 100 items linear search must examine an average of ___________ values 7 10 50 100 101 The linear search is adequate for searching through ________ arrays, but not through ____________ ones. int, double char, string ascending, descending small, large any regular, vector

Solution

Please follow the data and description :

9)

Linear Search :

In the stream of computer science, linear search or sequential search is a method for finding a target value within a list. It sequentially checks each element of the list for the target value until a match is found or until all the elements have been searched. Linear search at most n comparisons, where n is the length of the list. If each element is equally likely to be searched, then linear search has an average case of n/2 comparisons.

So the answer is OPTION D (100).

10)

when sorting an array of objects, if the values in the data member being sorted on are out of order for two objects, it is necessary to stop the sort so as to be examined seperately.

So the answer is OPTION E (stop the sort).

11)

Linear Search :

In the stream of computer science, linear search or sequential search is a method for finding a target value within a list. It sequentially checks each element of the list for the target value until a match is found or until all the elements have been searched. Linear search at most n comparisons, where n is the length of the list. If each element is equally likely to be searched, then linear search has an average case of n/2 comparisons.

So the answer is OPTION C (50).

12)

Linear Search can be sone through the int, char, double, float arrays but not through the strings.

So the answer is OPTION B (char, string).


Hope this is helpful.

 To determine that a item is not in an unordered array of 100 items, linear search must examine an average of ________ 7 10 50 100 101 When sorting an array of

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site