Exam 13: Recursion, Complexity, and Searching and Sorting

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

In a quicksort algorithm, the iterative approach requires a data structure called a(n) ____.

(Multiple Choice)
4.9/5
(32)

Identify the letter of the choice that best matches the phrase or definition. a.Activation record b.Stack c.Quadratic d.Exponential e.copyBuffer -When a method returns, its activation record is removed from the top of the ____.

(Essay)
5.0/5
(32)

An algorithm is ____ if no work is done in the algorithm after a recursive call.

(Multiple Choice)
4.7/5
(35)

Identify the letter of the choice that best matches the phrase or definition. a.Activation record b.Stack c.Quadratic d.Exponential e.copyBuffer -The name of the big-O value O(n squared).

(Essay)
4.7/5
(39)

Because the summation algorithm must visit each number in the array, no matter how the numbers are ordered, the algorithm is always linear. ____________________

(True/False)
4.9/5
(38)

FIGURE 13-2 FIGURE 13-2   -Figure 13-2 above shows subarrays generated during calls of ____. -Figure 13-2 above shows subarrays generated during calls of ____.

(Multiple Choice)
4.8/5
(35)

The big-O value O(1) is named logarithmic. ____________________

(True/False)
4.7/5
(39)

The big-O value O(n) is named ____________________.

(Short Answer)
4.8/5
(42)

FIGURE 13-2 FIGURE 13-2   -Leslie knows that the array will be sorted ____. -Leslie knows that the array will be sorted ____.

(Multiple Choice)
4.9/5
(41)

____________________ analysis is used to answer the question: what is the effect on the method of increasing the quantity of data processed?

(Short Answer)
4.8/5
(41)

A recursive step, in which the method calls itself, must ____.

(Multiple Choice)
4.7/5
(31)

Given two methods that perform the same task, the one that is quadratic is preferable to the one that is linear.

(True/False)
4.7/5
(39)

Jarrod knows that if the length of his list is 4 to 7, the maximum number of steps needed to do a binary search is ____.

(Multiple Choice)
4.8/5
(38)

sum(n) =n+sum(n-1), where n>1 is an example of a(n) ____ algorithm.

(Multiple Choice)
4.8/5
(44)

Given a recursive definition of some process, it is usually easy to write a recursive method that implements it.

(True/False)
4.9/5
(45)

The logarithmic big-O value is ____.

(Multiple Choice)
4.9/5
(43)

A ____ sort algorithm computes the middle position of an array and recursively sorts its left and right subarrays, merges to two sorted subarrays into a single sorted array, then stops when the subarrays can no longer be subdivided.

(Multiple Choice)
4.7/5
(46)

Identify the letter of the choice that best matches the phrase or definition. a.Activation record b.Stack c.Quadratic d.Exponential e.copyBuffer -Contains, among other things, the value returned by the method.

(Essay)
4.8/5
(38)

The constant big-O value is ____.

(Multiple Choice)
4.8/5
(42)

A(n) ____ algorithm is one that refers to itself.

(Multiple Choice)
4.8/5
(35)
Showing 21 - 40 of 47
close modal

Filters

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