Quiz II Review (Ch.8)

Réussis tes devoirs et examens dès maintenant avec Quizwiz!

T

Powers of 2 are used to calculate the maximum number of comparisons the binary search will make on an array of any size.

True

The average number of comparisons performed by the linear search on an array of N elements is N/2 (assuming the search values are consistently found).

T

The binary search is much more efficient than the linear search.

F

The linear search repeatedly divides the portion of an array being searched in half.

False

The maximum number of comparisons performed by the linear search on an array of N elements is N/2 (assuming the search values are consistently found).

search

A ________ algorithm is a method of locating a specific item of information in a larger collection of data. sort search standard linear None of these

binary, linear

A ________ search is more efficient than a ________ search. character, string integer, double binary, linear linear, binary None of these

middle

A binary search begins with the ________ element of an array. first last largest middle None of these

sorted

Array elements must ________ before a binary search can be performed. summed set to zero positive integers sorted None of these

F

Before you can perform a bubble sort, the data must be stored in descending order.

T

If you are using the bubble sort algorithm to sort an array in descending order, the smaller values move toward the end.

F

Binary search is also called as "sequential search"?

F

Bubble sort is very efficient for large arrays.

10

What is the maximum number of comparisons that a binary search function will make when searching for a value in a 1,000 element array? 1001 1000 10 11

1000

What is the maximum number of comparisons that a linear search function will make when searching for a value in a 1,000 element array and it fails to locate that item? 1000 1001 999 10


Ensembles d'études connexes

Peds Exam 1: Genitourinary & Respiratory

View Set

International Business Ch. 6: International Trade Theory

View Set

AGEC 330 Lecture 1, AGEC 330, Chapter 2 (pt 2) Time Value of Money Basics, AGEC 330 Exam 1, Ch. 9 Practice Problems, TAMU AGEC 330 with Leatham, AGEC 330 Lecture 15, AGEC 330, AGEC 330 Exam 4, AGEC 330 Lecture 24, AGEC 330 Exam 3 Review, AGEC 330 fin...

View Set

Anthropology Test 2 Ch. 7,8,9,10,11

View Set

Chapter 4 Choosing a Form of Business Ownership

View Set