# Data structure作业 | quiz作业 | 代做assignment – Week 10 Quiz

### Week 10 Quiz

Data structure作业 | quiz作业 | 代做assignment – 这是一个Data structure面向对象设计的practice, 考察Data structure的理解, 涵盖了Data structure等程序代做方面, 这是值得参考的assignment代写的题目

Started: Mar 30 at 9:02pm

### quiz Instructions

Take this quiz to review the concepts covered in the lectures Week 10, as well as check your readiness for assignment 9. Note that this quiz is not timed, but you may take it only once. As with all quizzes in CS 2420, your score on this quiz will contribute a very small amount to your final course grade. Perhaps more important is to use your score as an indication of how you are performing in the course and if you need to improve. Question 1 1 pts linear probing quadratic probing separate chaining For a hash table with which collision-resolving strategy is it possible to have a load factor of = 2.5? (Select all that apply.) Question 2 1 pts linear probing quadratic probing separate chaining For a hash table with which collision-resolving strategy is it possible to have a load factor of = 0.4? (Select all that apply.)

Question 3 1 pts linear probing quadratic probing separate chaining For a hash table with which collision-resolving strategy can a load factor of = 0. guarantee that adding a new item is O(1)? (Select all that apply.) Question 4 1 pts linear probing quadratic probing separate chaining Lazy deletion is required for a hash table with which collision-resolving strategy? (Select all that apply.) Question 5^1 pts Suppose that the current capacity of a quadratic probing hash table is 101 (i.e., the length of the backing array is 101) and the number of entries is 52. It is time to "double" the capacity of the table. What should the new capacity be? Question 6^1 pts

Suppose that this array backs a hash table that uses quadratic probing to resolve collisions: The hash function used is the identity function; e.g., the function maps an integer to itself. Insert integer item 1 into the hash table. At which array index is it placed? Question 7 1 pts Referring again to the quadratic-probing hash table in Question 6, how many collisions are incurred while doing the insertion of integer item 1? Question 8 1 pts True False In a hash table that resolves collisions using separate chaining, rehashing is needed to ensure that all operations perform correctly when the hash table’s load factor is large.

Question 9 1 pts balanced binary search tree hash table FIFO queue stack For which Data structure is finding the minimum fastest, in the average case? The remaining questions in this quiz check your readiness for Assignment 9. Question 10 1 pts True False Separate chaining is an easy option for implementing this assignment, since resizing the hash table and rehashing all existing items isn’t required. Question 11^1 pts True False The hashCode method must return an integer between 0 and X (exclusive), for a hash table with capacity X.

Question 12 1 pts True False Suppose we have two key-value pairs: ("hello", 3) and ("hello", 49). These two items must have the same hash code. Question 13 1 pts True False Suppose we have two key-value pairs: ("hello", 3) and ("world", 390). Placing these two items in the hash table must NOT result in a collision. Question 14^1 pts Consider a hash table created like so: HashTable<String, Integer> groceries = new HashTable<String, Integer>(); groceries.put("apples", 3); groceries.put("bread", 1); groceries.put("apples", 4); What should be returned by groceries.size()?

Quiz saved at 9:09pm Question 15 1 pts On a scale of 1 to 5 (1 being very unprepared and 5 being very prepared), how prepared are you to complete Assignment 9? Answer honestly, any input 1 through 5 receives full credit. Submit Quiz