Chapter 09 prog quiz

Ace your homework & exams now with Quizwiz!

alphabetic numeric Correct ascending descending None of these

To order an array of strings in alphabetic order, the sorting algorithm should be structured for ________ order.

Correct Subscript of the midpoint Middle value in the array Middle value in the portion to be searched The average of two values None of these

What does the variable middle represent in a binary search algorithm?

Bubble sort Selection sort Insertion sort Correct All of these None of these

Which of the following is a sorting algorithm?

Correct Bubble sort Insertion sort Selection sort All of these None of these

Which of the following sorting algorithms is the least efficient?

True Correct False

The sequential search algorithm is simple and most efficient to use with a large data array.

True Correct False

In a binary search, if the search fails to find the item on the first attempt, then there are 999 elements left to search in an array of 1000 elements.

1000 500 250 100 Correct None of these

In a binary search, what is the maximum number of comparisons that need to be performed if the array contains 1000 elements?

Correct True False

In a sequential search, each element is compared to the searchValue and the search stops when the value is found or the end of the array is encountered.

Global Reference Correct Local Constant None of these

In the swap module, the third variable is declared as a ________ variable.

Correct Ascending Descending Numeric Alphabetic None of these

When the elements in an array are stored from lowest to highest, the array is sorted in ________ order.


Related study sets

7 Habits of Highly Effective People

View Set

Med Surg Ch. 34 Hematologic Neoplasms

View Set

Unit 6: Carbohydrate Metabolism and Adenosine Triphosphate (ATP)

View Set

Processing of Measuring and Summarizing Health Data

View Set