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 381–390 of 1,079
  1. 381
  2. 382
  3. 383
  4. 384
  5. 385
  6. 386
  7. 387
  8. 388
  9. 389
  10. 390

Question 381

Multiple choice Recursion
What value does f1(5,3) return? public int f1(int a,int b) { if(a==b)…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 382

Multiple choice Recursion
Assuming mathematical integer arithmetic without overflow, what is z? public int…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 383

Multiple choice Sorting And Searching
Which factors matter when choosing a sorting algorithm? I:…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 384

Multiple choice Sorting And Searching
What safely completes a left-to-right search that returns the matching index…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 385

Multiple choice Sorting And Searching
Which property lets binary search discard a half,…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 386

Multiple choice Sorting And Searching
For the best standard algorithms on random-access arrays, which operation has a better worst-case asymptotic time bound on sorted…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 387

Multiple choice Sorting And Searching
A sorted-array search probes every third element from the front, then checks up to two preceding entries in the first…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 388

Multiple choice Sorting And Searching
For a nonempty array,…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 389

Multiple choice Sorting And Searching
Assuming a is nonempty, when does this code definitely fail its intended…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 390

Multiple choice Sorting And Searching
For [89,42,−3,13,109,70,2], what is the array after the third outer-loop pass of descending selection sort? public class Sorter { private Integer[] a…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 381 of 1,079
Page 39 of 108