Verityprep
Question Bank

AP® Computer Science A Practice Questions

Work through AP Computer Science A practice questions unit by unit, 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 2,151–2,160 of 3,140
  1. 2151
  2. 2152
  3. 2153
  4. 2154
  5. 2155
  6. 2156
  7. 2157
  8. 2158
  9. 2159
  10. 2160

Question 2151

Multiple choice Unit 4: Data Collections
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 2152

Multiple choice Unit 4: Data Collections
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 2153

Multiple choice Unit 4: Data Collections
Which approach…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 2154

Multiple choice Unit 4: Data Collections
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 2155

Multiple choice Unit 4: Data Collections
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 2156

Multiple choice Unit 4: Data Collections
Which…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 2157

Multiple choice Unit 4: Data Collections
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 2158

Multiple choice Unit 4: Data Collections
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 2159

Multiple choice Unit 4: Data Collections
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 2160

Multiple choice Unit 4: Data Collections
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 2,151 of 3,140
Page 216 of 314