Exam 9: Searching, Sorting, Algorithm Analysis

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

The advantage of a linear search is that

Free
(Multiple Choice)
4.8/5
(38)
Correct Answer:
Verified

E

Sorted data can be ordered

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

E

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

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

False

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

(Multiple Choice)
4.7/5
(38)

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

(Multiple Choice)
4.8/5
(26)

If algorithm A requires 2n + 1 basic operations to process an input of size n, and Algorithm B requires 3n + 2 basic operations to process the same input, algorithm A is considered to be more efficient than Algorithm B.

(True/False)
4.8/5
(38)

The ________ search is adequate for searching through small arrays, but not through large ones.

(Multiple Choice)
4.7/5
(38)

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

(True/False)
4.9/5
(33)

A search can be performed on an array of

(Multiple Choice)
4.8/5
(36)

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

(True/False)
4.8/5
(39)

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

(Multiple Choice)
4.8/5
(35)

When sorting an array of objects, if the values in the data member being sorted on are out of order for two objects, those two data values should be swapped.

(True/False)
4.8/5
(33)

When searching for an item in an unordered set of data, binary search can find the item more quickly than linear search.

(True/False)
4.9/5
(29)

Bubble sort and selection sort can also be used with STL vectors.

(True/False)
4.8/5
(36)

When sorting an array of objects, if the values in the data member being sorted on are out of order for two objects, it is necessary to

(Multiple Choice)
4.9/5
(29)

A sorting algorithm can be used to arrange a set of ________ in ________ order.

(Multiple Choice)
4.9/5
(35)

We can estimate the ________ of an algorithm by counting the number of basic steps it requires to solve a problem.

(Multiple Choice)
4.8/5
(36)

The linear search is adequate for searching through ________ arrays, but not through ________ ones.

(Multiple Choice)
4.9/5
(39)

We can measure the complexity of an algorithm that solves a computational problem by determining the number of ________ for an input of size n.

(Multiple Choice)
4.9/5
(43)

A(n) ________ algorithm arranges data into some order.

(Multiple Choice)
4.9/5
(43)
Showing 1 - 20 of 40
close modal

Filters

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