Question: QUESTION 1: Answer the following multiple subsections about Java: Sorting and Maps. A prerequisite to performing a sort is: a. An ArrayList b. An equals
QUESTION 1: Answer the following multiple subsections about Java: Sorting and Maps.
-
A prerequisite to performing a sort is: a. An ArrayList b. An equals operator c. A comparison operator d. A linked list
-
The following pattern could be used in which type of sort: int splitPoint = split(a,begin,end); sort(a, being, splitPoint); sort(a, splitPoint+1, end); join(a, begin, splitPoint, end):
a. bubble
b. selection
c. merge
d. Insertion
-
When a sorting algorithm is described as stable, that means:
a. Always takes the same amount of time, regardless of original data ordering b. For duplicate keys, preserves the original order c. Guaranteed to terminate -
The Big-O of a binary search over a sorted list is:
a. log n b. n log n c. n d. n^2 -
In a map class, the capacity is:
a. Percentage of buckets that have values b. The buckets in the hash table -
In a map class, the load is:
a. The number of buckets in the hash table b. The percentage of buckets that have values -
The main difference between Lists and Sets is:
a. Only Sets are abstract b. Sets do not allow an element to occur more than once c. Lists have iterators -
Rehashing occurs when
a. A HashMap becomes full and resizes b. A pair is added to a HashMap c. A pair is removed from a HashMap
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
