Exam 8: Searching and Sorting Arrays

arrow
  • Select Tags
search iconSearch Question
flashcardsStudy Flashcards
  • Select Tags

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

Free
(Multiple Choice)
4.9/5
(39)
Correct Answer:
Verified

B

The number of comparisons made by a binary search is expressed in powers of two.

Free
(True/False)
4.9/5
(39)
Correct Answer:
Verified

True

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

Free
(True/False)
4.8/5
(35)
Correct Answer:
Verified

True

A linear search can only be implemented with integer values.

(True/False)
4.8/5
(42)

A(n)________ search is more efficient than a ________ search.

(Multiple Choice)
4.8/5
(41)

A(n)________ search uses a loop to sequentially step through an array.

(Multiple Choice)
4.9/5
(43)

The ________ is adequate for searching through small arrays.

(Multiple Choice)
4.8/5
(36)

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

(Multiple Choice)
4.9/5
(35)

Array elements must be ________ before a binary search can be performed.

(Multiple Choice)
4.8/5
(37)

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

(True/False)
4.8/5
(36)

A binary search begins with the ________ element of an array.

(Multiple Choice)
4.8/5
(40)

The advantage of a linear search is its ________.

(Multiple Choice)
4.9/5
(33)

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.

(Multiple Choice)
4.8/5
(38)

________ algorithms are used to arrange random data into some order.

(Multiple Choice)
4.7/5
(36)

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

(True/False)
4.7/5
(44)

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

(True/False)
4.9/5
(42)

Data that is sorted in ascending order is ordered ________.

(Multiple Choice)
4.8/5
(42)

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

(True/False)
4.8/5
(38)

Regardless of the algorithm being used, a search through an array is always performed ________.

(Multiple Choice)
4.9/5
(32)

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

(Multiple Choice)
4.8/5
(45)
close modal

Filters

  • Essay(0)
  • Multiple Choice(0)
  • Short Answer(0)
  • True False(0)
  • Matching(0)