Exam 8: Recursion

arrow
  • Select Tags
search iconSearch Question
  • Select Tags

Suppose you are recursively searching an array filled with 512 items . If each subdivision returns two smaller arrays with n/2 items, how many smaller arrays are generated at the third level of the search?

(Multiple Choice)
4.8/5
(33)

The altered version of print_chars_reverse defined below will output the characters of the string argument in reverse order. The altered version of print_chars_reverse defined below will output the characters of the string argument in reverse order.

(True/False)
4.7/5
(35)

To test the binary search algorithm, you must test vectors with an even number of elements and vectors with an odd number of elements.

(True/False)
4.9/5
(38)

The iterative version of a function always requires significantly more memory that a recursive version.

(True/False)
4.8/5
(48)

The iterative and recursive algorithms used to compute a factorial value are O(__________), because the number of loop repetitions or recursive calls increases linearly with n.

(Multiple Choice)
4.9/5
(34)
Showing 21 - 25 of 25
close modal

Filters

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