Exam 9: Searching, Sorting, and Algorithm Analysis

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

A search can be performed on an array of

(Multiple Choice)
4.7/5
(42)

To determine that a item is not in an unordered array of 100 items, linear search must examine an average of values.

(Multiple Choice)
4.9/5
(41)

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

(Multiple Choice)
4.9/5
(32)

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, algorithms A and B are considered to be equally efficient.

(True/False)
4.8/5
(34)

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

(True/False)
4.9/5
(42)

To locate a value that is in an ordered array of 50 items, linear search must examine at most values.

(Multiple Choice)
4.8/5
(38)

A binary search begins by examining the _ element of an array.

(Multiple Choice)
4.8/5
(35)

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

(Multiple Choice)
4.8/5
(34)

To locate a value in an ordered array of 100 items, binary search must examine at most values.

(Multiple Choice)
4.9/5
(36)

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

(True/False)
4.9/5
(27)

A(n)________search is more efficient than a(n)________search.

(Multiple Choice)
4.8/5
(42)

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

(True/False)
4.8/5
(38)

The advantage of a linear search is that

(Multiple Choice)
4.8/5
(33)

The________ sort usually performs fewer exchanges than the________ sort.

(Multiple Choice)
4.8/5
(45)

When sorting an array of objects or structures, one must decide which data item to sort on.

(True/False)
4.7/5
(29)

A binary search requires that the elements be in order.

(True/False)
4.8/5
(38)
Showing 21 - 36 of 36
close modal

Filters

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