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.

Subtopic: Recursion Clear filter

Questions 111–120 of 140
  1. 111
  2. 112
  3. 113
  4. 114
  5. 115
  6. 116
  7. 117
  8. 118
  9. 119
  10. 120

Question 111

Multiple choice Recursion
What does mystery(3543) return? public int…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 112

Multiple choice Recursion
What does mystery(6) return? public int…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 113

Multiple choice Recursion
What does mystery(10) return? public int mystery(int…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 114

Multiple choice Recursion
Which recursive definitions match a loop that sums integers x through 1, for every x >= 0? Assume no integer overflow. // I:…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 115

Multiple choice Recursion
What does mystery(30,18) return? public…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 116

Multiple choice Recursion
Which replacement makes mystery(10)…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 117

Multiple choice Recursion
What does sum(4) return? public int…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 118

Multiple choice Recursion
Consider the following method. public static void mystery(int j, int k) { if (j > k) { mystery(j -…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 119

Multiple choice Recursion
Consider the following recursive method. public static int mystery(int x) { if (x <= 1 || x == 3)…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 120

Multiple choice Recursion
What is mystery(7)? public static int mystery(int n)…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 111 of 140
Page 12 of 14