Chapter 8 Test 1

# Chapter 8 Test 1 - bubble, selection B. binary, linear C....

This preview shows pages 1–4. Sign up to view the full content.

1. A ________ algorithm is a method of locating a specific item of information in a larger collection of data. A. sort B. search C. standard D. linear E. None of these 2. The advantage of a linear search is its ____________. A. complexity B. efficiency C. simplicity D. speed E. None of these 3. A(n) ________ search is more efficient than a(n) ________ search A. character, string B. integer, double C. binary, linear D. linear, binary Chapter 8 Test 1 Thursday, February 24, 2011 5:13 AM General Page 1

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
E. None of these 4. A binary search begins with the _________ element of an array. A. first B. last C. largest D. middle E. None of these 5. True/False: The bubble sort is an easy way to arrange data into ascending order, but it cannot arrange data into descending order. A. True B. False 6. The _________ sort usually performs fewer exchanges than the ________ sort. A.

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: bubble, selection B. binary, linear C. selection, bubble D. ANSI, ASCII E. None of these General Page 2 7. True/False: The number of comparisons made by a binary search is expressed in powers of two. A. True B. False 8. 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. A. True B. False 9. Array elements must be _________ before a binary search can be performed. A. summed B. set to zero C. sorted D. positive numbers E. None of these 10. 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. 19,999 B. only the first C. only half D. 2000 General Page 3 E. None of these General Page 4...
View Full Document

## This note was uploaded on 02/24/2011 for the course CS 245 taught by Professor Duke during the Fall '10 term at VCU.

### Page1 / 4

Chapter 8 Test 1 - bubble, selection B. binary, linear C....

This preview shows document pages 1 - 4. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online