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 381–390 of 1,222
  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 does t(5) return? // Precondition: n is positive. public int…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 382

Multiple choice Recursion
How many calls to t occur for t(6), including the initial call? // Precondition: n is…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 383

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 384

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 385

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 386

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 387

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 388

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 389

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 390

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 381 of 1,222
Page 39 of 123