NEW
Font size
WorksheetsAPCSA Search & Sort
Total questions: 15
Worksheet time: 29mins
Which method puts all items in x in ascending order?
sort(x)
binarySearch(x,y)
equals(x,y)
toString(x)
fill(x,y)
Which method checks x for the location of y?
sort(x)
binarySearch(x,y)
equals(x,y)
toString(x)
fill(x,y)
Which method checks if x and y have the same value?
sort(x)
binarySearch(x,y)
equals(x,y)
toString(x)
fill(x,y)
Which method returns a string version of x in [ , ] form?
sort(x)
binarySearch(x,y)
equals(x,y)
toString(x)
fill(x,y)
binarySearch works best on:
unsorted array
sorted or unsorted arrays
sorted array
If the specified value is present, binarySearch will return:
true
spot at which the value is present
yes
the value
If the value is NOT present, binarySearch will return:
False
-1
-1 + -1 + (where it should be present)
-1 + -1 * (where it should be present)
Linear/Sequential Algorithm are:
complicated
basic
extremely long code
one line of code
Linear/Sequential search is most commonly written using:
nested for loops
a for loop and an if statement
multiple if statements
2D arrays
Selection Sort puts all of the items in an array in:
ascending order only
descending order only
ascending or descending
neither ascending or descending
Selection sort is most commonly written using:
nested for loops
a for loop and an if statement
multiple if statements
2D arrays
split() returns:
number of items in an array
list of Strings in alphabetical order
all Strings connected as one long word
array of String references
split() requires that a split value be provided
True
False
split() can be used to like a Scanner to chop up large numbers into smaller numbers
True
False
Which is correct?
import java.util.Arrays;
import.java.util.array;
import java.util.Array;
import Java.Util.Arrays;
import Java.Util.Array;
