Ch 8

¡Supera tus tareas y exámenes ahora con Quizwiz!

Descending

If an array is sorted in _________ order, the values are stored from highest to lowest.

ascending

If an array is sorted in _________ order, the values are stored from lowest to highest.

true

If data are sorted in ascending order, it means they are ordered from lowest value to highest value.

False

If data are sorted in descending order, it means they are ordered from lowest value to highest value.

linear

The _________ search algorithm is adequate for small arrays but not large arrays.

Binary

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

Binary

The _________ search algorithm requires that the array's contents be sorted.

linear (or sequential)

The _________ search algorithm steps sequentially through an array, comparing each item with the search value.

True

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

False

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


Conjuntos de estudio relacionados

peril -serious and immediate danger pos-noun form-adjective perils,perilous adverb

View Set

History and Geography 902 self test 2 study guide

View Set

Chapter 2 Cells, Tissue , Organs and Systems

View Set