Verityprep
Question Bank · Unit 4

AP® Computer Science A Data Collections Practice Questions

Work through AP Computer Science A practice 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 401–410 of 1,222
  1. 401
  2. 402
  3. 403
  4. 404
  5. 405
  6. 406
  7. 407
  8. 408
  9. 409
  10. 410

Question 401

Multiple choice Sorting And Searching
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 402

Multiple choice Sorting And Searching
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 403

Multiple choice Sorting And Searching
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 404

Multiple choice Sorting And Searching
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 405

Multiple choice Sorting And Searching
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 406

Multiple choice Sorting And Searching
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 407

Multiple choice Sorting And Searching
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 408

Multiple choice Sorting And Searching
Which algorithm does…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 409

Multiple choice Sorting And Searching
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 410

Multiple choice Sorting And Searching
What is merge’s role in…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 401 of 1,222
Page 41 of 123