Verityprep
Question Bank · Unit 4

AP® Computer Science A Data Collections FRQ

Work through AP Computer Science A free-response 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: Arrays Clear filter

Questions 1–10 of 41
  1. 1
  2. 2
  3. 3
  4. 4
  5. 5
  6. 6
  7. 7
  8. 8
  9. 9
  10. 10

Question 1

Free response Arrays
Customers are ordered alphabetically by name, then by positive integer ID when names match. Matching names and IDs identify equal customers. Complete both…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 2

Free response Arrays
The PR2004 is a robot that automatically gathers toys and other items scattered in a tiled hallway. A tiled hallway has a wall at each end and consists of a…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 3

Free response Arrays
This question involves reasoning about an array of integers with no duplicate values. An inversion is a pair of values in an array where a larger value appears…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 4

Free response Arrays
A statistician is studying sequences of numbers obtained by repeatedly tossing a six-sided number cube. On each side of the number cube is a single number in…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 5

Free response Arrays
An electric car that runs on batteries must be periodically recharged for a certain number of hours. The battery technology in the car requires that the charge…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 6

Free response Arrays
Consider the following partial declaration for a WordScrambler class. The constructor for the WordScrambler class takes an even-length array of String objects…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 7

Free response Arrays
An array of positive integer values has the mountain property if the elements are ordered such that successive values increase until a maximum value (the peak…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 8

Free response Arrays
This question involves reasoning about one-dimensional and two-dimensional arrays of integers. You will write three static methods, all of which are in a single…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 9

Free response Arrays
All emails received by the Office of Complaints in Appaloosa County are assigned a priority rank from 0 to 9 and answered in order of priority; emails of higher…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 10

Free response Arrays
Hotel maintains rooms numbered0 through rooms.length−1 and a waiting list of guest names. A null rooms entry is unreserved; any nonnull entry is a Reservation…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 1 of 41
Page 1 of 5