COP2000 Chapter 8

अब Quizwiz के साथ अपने होमवर्क और परीक्षाओं को एस करें!

Using a linear search to find a value that is stored in the last element of an array that contains 20,000 elements, ________ elements must be compared.

20,000

The following function should swap the values contained in two integer variables, num1 and num2. What, if anything, is wrong with this function?

The swap function must use reference parameters.

The following is the pseudocode for which type of algorithm?

binary search

A ________ search is more efficient than a ________ search.

binary, linear

When an array is sorted from highest to lowest, it is said to be in

descending order

Data that is to be sorted in ascending order is ordered

from lowest value to highest value

Algorithms used to arrange random data in some order are ________ algorithms.

sorting

A ________ algorithm is a method of locating a specific item of information in a larger collection of data.

search

The following is the pseudocode for which type of algorithm?

selection sort

The ________ sort usually performs fewer exchanges than the ________ sort.

selection, bubble


संबंधित स्टडी सेट्स

Chapter 5 - Ecosystems and Living Organisms

View Set

Pathology 42% Scrotum, Thyroid, Vasc.

View Set

Unit 5 : LC 5b / Sensation and Perception( 30Q required)

View Set

Review Questions: Describe the three-step process that managers use to make sense of their changing environments.

View Set

Horticulture Produce CDEs Test Bank

View Set

Elements whose symbol is first and third letter of its name

View Set