Chapter 8 study guide

Pataasin ang iyong marka sa homework at exams ngayon gamit ang Quizwiz!

Array elements must be _________ before a binary search can be performed. A. positive numbers B. summed C. sorted D. None of these E. set to zero

sorted

___________ algorithms are used to arrange random data into some order. A. Sorting B. None of these C. Binary search D. Linear E. Standard search

sorting

True/False: A linear search can only be implemented with integer values. True False

False

True/False: Using a binary search, you are more likely to find an item than if you use a linear search. True False

False

Using a linear search to find a value that is stored in the last element of an array of 20,000 elements, ____________ element(s) must be compared. A. 20,000 B. 2000 C. only half D. None of these E. only the first

20,000

True/False: In the average case, an item is just as likely to be found near the beginning of an array as near the end. True False

True

True/False: The number of comparisons made by a binary search is expressed in powers of two. True False

True

A(n) ________ search is more efficient than a(n) ________ search A. integer, double B. linear, binary C. binary, linear D. character, string E. None of these

binary, linear

When an array is sorted from highest to lowest, it is said to be in _____ order. A. ascending B. descending C. None of these D. reverse E. forward

descending

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

false

True/False: Before you can perform a selection sort, the data must be stored in ascending order. True False

false

True/False: The bubble sort is an easy way to arrange data into ascending order, but it cannot arrange data into descending order. True False

false

Data that is sorted in ascending order is ordered A. always with a binary sort algorithm B. always with a linear sort algorithm C. None of these D. from lowest to highest value E. from highest to lowest value

from lowest to highest value

A(n) ________ search uses a loop to sequentially step through an array. A. unary B. relative C. binary D. linear E. None of these

linear

The _________ is adequate for searching through small arrays. A. unary search B. None of these C. bubble sort D. binary search E. linear search

linear search

A binary search begins with the _________ element of an array. A. middle B. largest C. None of these D. first E. last

middle

Regardless of the algorithm being used, a search through an array is always performed A. beginning with the middle element B. None of these C. using a binary search D. from lowest to highest element E. from highest to lowest element

none of these

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

search

The _________ sort usually performs fewer exchanges than the ________ sort. A. binary, linear B. None of these C. selection, bubble D. bubble, selection E. ANSI, ASCII

selection,bubble

The advantage of a linear search is its ____________. A. efficiency B. complexity C. simplicity D. speed E. None of these

simplicity


Kaugnay na mga set ng pag-aaral

Chapter 8 - Socioemotional Development in Early Childhood

View Set

FUNDIES 2 EXAM 2 PRACTICE QUESTIONS

View Set

Intro to Professional Nursing- Chapter 2

View Set

Radiology chapter 38,39,40,41,42

View Set

Client/Server Programming - Week 13

View Set

Marketing and Consumer Mountain Exam 2

View Set

Sociology Exam #1 (CENTELLAS__OLEMISS)

View Set