Question: Consider the HashMap() implemented in Java8, according to the explanation of data structure 2. Assume each hash table (array) has size N 4n/3, and that

Consider the HashMap() implemented in Java8, according to the explanation of data structure 2. Assume each hash table (array) has size N 4n/3, and that n entries have been inserted A) What is the load factor of the table? (0.5 pt) For B-E, assume the hash function was very bad for our data, and half of the keys got mapped to one position/bucket, and the other half to another bucket (i.e. only two positions in the array received n/2 keys each). What is the worst case running time in terms of big Oh for the operation get(k) for. B) . data structure 1? Briefly justify. (0.5 pt) C) data structure 2? Briefly justify. (1 pt) What is the average-case running time in terms of big Oh for the operation get(k) for . D) ..data structure 1 Briefly justify. (1 pt) E) . data structure 2? Briefly justify. (1 pt) For F, assume that the hash function spreads keys in the following way: one position receives vn keys while all other keys are in different positions (no colisions). What is the worst case running time in terms of big Oh for the operation get(k) for F).. data structure 1? Briefly justify. (1 pt) G). data structure 2? Briefly justify. (1 pt) Bonus What is the average-case running time in terms of big Oh for the operation get(k) for H).data structure 1 ? Briefly justify. (bonus 1pt) ) data structure 2? Briefly justify. (bonus 1 pt) Consider the HashMap() implemented in Java8, according to the explanation of data structure 2. Assume each hash table (array) has size N 4n/3, and that n entries have been inserted A) What is the load factor of the table? (0.5 pt) For B-E, assume the hash function was very bad for our data, and half of the keys got mapped to one position/bucket, and the other half to another bucket (i.e. only two positions in the array received n/2 keys each). What is the worst case running time in terms of big Oh for the operation get(k) for. B) . data structure 1? Briefly justify. (0.5 pt) C) data structure 2? Briefly justify. (1 pt) What is the average-case running time in terms of big Oh for the operation get(k) for . D) ..data structure 1 Briefly justify. (1 pt) E) . data structure 2? Briefly justify. (1 pt) For F, assume that the hash function spreads keys in the following way: one position receives vn keys while all other keys are in different positions (no colisions). What is the worst case running time in terms of big Oh for the operation get(k) for F).. data structure 1? Briefly justify. (1 pt) G). data structure 2? Briefly justify. (1 pt) Bonus What is the average-case running time in terms of big Oh for the operation get(k) for H).data structure 1 ? Briefly justify. (bonus 1pt) ) data structure 2? Briefly justify. (bonus 1 pt)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
