Exam 13: Recursion, Complexity, and Searching and Sorting

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

The general idea behind a ____ algorithm is to break an array into two parts, then rearrange the elements so the larger values are at one end and the smaller values at the other, then repeat until the subparts contain a single value.

Free
(Multiple Choice)
4.7/5
(41)
Correct Answer:
Verified

D

FIGURE 13-1 FIGURE 13-1   -Figure 13-1 above shows an example of ____. -Figure 13-1 above shows an example of ____.

Free
(Multiple Choice)
4.7/5
(41)
Correct Answer:
Verified

C

When a method is called, an activation ____________________ is added to the top of the call stack.

Free
(Short Answer)
4.8/5
(44)
Correct Answer:
Verified

record

The call stack contains, among other things, the method's local variables.

(True/False)
4.9/5
(36)

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(2 to the nth power).

(Essay)
4.7/5
(32)

A(n) ____ is a GUI control that allows the user to select a value within a range of values.

(Multiple Choice)
4.9/5
(35)

execution time = O(n) is an example of big-O ____________________.

(Short Answer)
4.7/5
(39)

Computer scientists use expressions such as O(n) to express the linear relationship between an array's length and the execution time.

(True/False)
4.9/5
(36)

mergeSortHelper is a private method that ___.

(Multiple Choice)
4.7/5
(44)

In a(n) infinite recursion, the algorithm never reaches its stopping state. ____________________

(True/False)
4.9/5
(36)

Using a binary search, finding a value from a list of a million entries involves at most 20 steps.

(True/False)
4.8/5
(38)

A stack overflow error occurs when ____.

(Multiple Choice)
4.8/5
(38)

In a linear equation, the best-, worst-, and average-case behaviors are O(1).

(True/False)
4.7/5
(32)

Complexity analysis is concerned with determining an algorithm's efficiency.

(True/False)
4.8/5
(29)

In order to use a(n) binary search, the list must be sorted in ascending order. ____________________

(True/False)
4.9/5
(41)

A(n) ____ object uses a highly repetitive or recursive pattern.

(Multiple Choice)
4.8/5
(41)

A(n) ____ search starts at the beginning of an array and looks at consecutive elements until the search value is located or the end of the array is reached.

(Multiple Choice)
4.8/5
(29)

A recursive method must have a well-defined ____.

(Multiple Choice)
4.8/5
(36)

When a method returns, its activation record is removed from the top of the stack.

(True/False)
4.9/5
(40)

A large storage area known as a(n) activation record is created at program startup. ____________________

(True/False)
4.8/5
(35)
Showing 1 - 20 of 47
close modal

Filters

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