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: Sorting And Searching Clear filter

Questions 101–110 of 139
  1. 101
  2. 102
  3. 103
  4. 104
  5. 105
  6. 106
  7. 107
  8. 108
  9. 109
  10. 110

Question 101

Multiple choice Sorting And Searching
After the fourth outer pass of standard ascending…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 102

Multiple choice Sorting And Searching
Which condition completes ascending insertion sort? public void insertionSort(int[] arr) { for(int…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 103

Multiple choice Sorting And Searching
Array arr2 has been defined and initialized as follows. int[] arr2 = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11}; If the array is being searched for the…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 104

Multiple choice Sorting And Searching
Consider the following scenario: A school is organizing a race, and the top three fastest runners will receive awards. The race times of 500…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 105

Multiple choice Sorting And Searching
Merge sort takes about18ms for80000 random values and40ms for160000. Which…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 106

Multiple choice Sorting And Searching
The Binary Search algorithm is designed to work with an array sorted in ascending order. Under which of the following circumstances will the algorithm find a…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 107

Multiple choice Sorting And Searching
Consider the following method. /** * Returns the location of the target value in the array a, or -1 if not found. * Precondition: a[0] ... a[a.length - 1] are…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 108

Multiple choice Sorting And Searching
Suppose an array arr contains 127 different random values arranged in ascending order, and the most efficient searching…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 109

Multiple choice Sorting And Searching
Given two arrays of double values sorted in ascending order, one with 100 elements and the other with 10 elements, how many…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 110

Multiple choice Sorting And Searching
Consider the following method, intended to use Binary Search to find the location of target within ArrayList<String> a. public int…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 101 of 139
Page 11 of 14