Verityprep
Question Bank · Unit 4

AP® Computer Science A Data Collections Multiple Choice Questions

Work through AP Computer Science A multiple-choice questions on Data Collections, then check each answer against a worked solution.

Free · no sign-up Open questions need no account. Sign up or log in to open the rest.

Questions 231–240 of 1,079
  1. 231
  2. 232
  3. 233
  4. 234
  5. 235
  6. 236
  7. 237
  8. 238
  9. 239
  10. 240

Question 231

Multiple choice Sorting And Searching
For a sorted array of length at least3, when can a left-to-right linear…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 232

Multiple choice Sorting And Searching
What is the maximum number of midpoint inspections…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 233

Multiple choice Sorting And Searching
Which approach…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 234

Multiple choice Sorting And Searching
Which sorting method is implemented? public int[] array public int[] tempArr public int length public void sort(int[] inputArr) {…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 235

Multiple choice Sorting And Searching
For standard insertion sort and top-down merge sort…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 236

Multiple choice Sorting And Searching
Which…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 237

Multiple choice Recursion
Consider the following recursive function: public int mystery(int n) { if (n == 0) { return 2; } else { return 2 * mystery(n -…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 238

Multiple choice Recursion
Consider the following recursive function: public static void printDigits(int number) { if (number == 0) { return;…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 239

Multiple choice Recursion
The following recursive method is intended to return the number of occurrences of a word from a phrase. 1: public static int countWord(String phrase, String…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 240

Multiple choice Recursion
Given the following code: String number = "8735"; int sum = 0; for (int i = 0;i < number.length();i++) { sum +=…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 231 of 1,079
Page 24 of 108