Verityprep
Question Bank

AP® Computer Science A Multiple Choice Questions

Work through AP Computer Science A multiple-choice 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,131–2,140 of 2,811
  1. 2131
  2. 2132
  3. 2133
  4. 2134
  5. 2135
  6. 2136
  7. 2137
  8. 2138
  9. 2139
  10. 2140

Question 2131

Multiple choice Unit 4: Data Collections
Which input requires the fewest executions of a[j+1]=a[j] while sorting descending? private Integer[] a; public void…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 2132

Multiple choice Unit 4: Data Collections
Which input requires the most executions of a[j+1]=a[j] while sorting descending? private Integer[] a; public void…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 2133

Multiple choice Unit 4: Data Collections
The programmer removes j>=0 from the while condition. For a nonempty array with at least two nonnull entries, which conditions independently guarantee that the…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 2134

Multiple choice Unit 4: Data Collections
For nearly descending data, which is a valid general reason to prefer descending insertion sort to standard selection sort? I: insertion sort…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 2135

Multiple choice Unit 4: Data Collections
For large randomly ordered arrays, which is a valid asymptotic advantage of standard merge sort over…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 2136

Multiple choice Unit 4: Data Collections
A four-character pattern is "pqrs". A block-based scan first inspects indices3,7,11,...…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 2137

Multiple choice Unit 4: Data Collections
The array names[0], names[1], ..., names[9999] is a list of 10,000 name strings. The list is to be searched to…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 2138

Multiple choice Unit 4: Data Collections
Which algorithm does…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 2139

Multiple choice Unit 4: Data Collections
In a standard in-place quicksort partition, elements are rearranged…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 2140

Multiple choice Unit 4: Data Collections
What is merge’s role in…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 2,131 of 2,811
Page 214 of 282