Home Quizzes Quiz Detail
Practice Quiz

AP CSP Practice Test - Unit 10 Recursion

24 questions 5.0 rating Mobile friendly
$69.00

Unlock the full practice quiz

Get complete access to the questions, explanations and printable quiz resources.

Full access: unlock all quiz questions and explanations.
Printable review: access the full quiz PDF with correct answers after purchase.

About this Exam

Prepare with the AP CSP Practice Test - Unit 10 Recursion practice quiz. This question bank includes 24 questions covering return, method, high, array, and public. Use it to review important concepts, identify knowledge gaps, and build confidence for the related exam, course, or assessment.

Sample Questions

Question 1
Questions refer to the Hi-Lo game described below. Consider the problem of writing a Hi-Lo game in which a user thinks of an integer from 1 to 100 inclusive and the computer tries to guess that number. Each time the computer makes a guess, the user makes one of three responses: “lower” (i.e., the number is lower than the computer’s guess) “higher” (i.e., the number is higher than the computer’s guess) “you got it in < however many > tries! ” Suppose the game is programmed so that the computer uses a binary search strat- egy for making its guesses. What is the maximum number of guesses the com- puter could make before guessing the user’s number?
6
8
a[4] . . . a[7]
7
Explanation:
Correct answer: 7
Question 2
Consider a binary search algorithm to search an ordered list of numbers. Which of the following choices is closest to the maximum number of times that such an algorithm will execute its main comparison loop when searching a list of 1 million numbers?
16
20
22
24
Explanation:
Correct answer: 20
Question 3
A binary search is to be performed on an array with 600 elements. In the worst case, which of the following best approximates the number of iterations of the algorithm?
8
10
11
12
Explanation:
Correct answer: 10
Question 4
Assume that mergesort will be used to sort an array arr of n integers into increas- ing order. What is the purpose of the merge method in the mergesort algorithm?
For no string inputs
For all string inputs
III only
Merge two sorted parts of arr into a single sorted array.
Explanation:
Correct answer: Merge two sorted parts of arr into a single sorted array.
Question 5
The array names[0], names[1], . . . , names[9999] is a list of 10,000 name strings. The list is to be searched to determine the location of some name X in the list. Which of the following preconditions is necessary for a binary search?
I and III only
When x is very close to the beginning of the array
The list is in alphabetical order.
n
Explanation:
Correct answer: The list is in alphabetical order.

Ready to test your knowledge?

Buy Now to Access

Additional Information

AP CSP Practice Test - Unit 10 Recursion

This practice set contains 24 questions from the matching question bank and focuses on return, method, high, array, and public. Work through each question carefully, review the provided solutions, and revisit topics that need more study before your next attempt.

This is an independent study resource intended for practice and review; it is not an official examination or an endorsement by any organization named in the title.

Frequently Asked Questions

This quiz contains a total of 24 practice questions carefully selected to test your knowledge on this subject.
Yes, you will have exactly 0 minutes to complete the exam. A countdown timer will be visible once you start.
Yes, you can retake this practice test as many times as you need. The questions and options may be randomized on subsequent attempts to ensure comprehensive learning.

Reviews

5.0

Based on 0 reviews

Leave a Review

No reviews yet. Be the first to review!