Question: Can I get the solution for #20 and #21 please? FC Chegg Study Guided Solution x object-oriented Data Structurx Arghya E C 10 file:///Users/arghyachowdhury/Downloads/Object-Oriented%20Data%20Structures%20Using%20Java,%20Fourth%20Edition.pdf *

Can I get the solution for #20 and #21 please?
FC Chegg Study Guided Solution x object-oriented Data Structurx Arghya E C 10 file:///Users/arghyachowdhury/Downloads/Object-Oriented%20Data%20Structures%20Using%20Java,%20Fourth%20Edition.pdf * - : & + O Object-Oriented Data Structures Using Java, Fourth Edition 568 / 714 used, with true indicating a slot nas been used. d. array size is 10, with buckets consisting of linked lists. 8.5 Hash Functions 18. Describe three domains/application areas where you might expect to be able to define a perfect hash function (no collisions). 19. Discuss rehashing (enlarging a hash table dynamically). Why? When? How? 20. In the nine-digit city code example suppose the hash function used is ((AXC) + B). What is the hash code for each of the following cities? a. Hangzhou, Zhejiang, China: 001112038 b. Lancaster, Pennsylvania, USA: 012113103 C. Yiyang, Hunan, China: 321732038 d. Beaver Falls, Pennsylvania, USA: 54213103 e. Seoul, Seoul, South Korea: 010313121 21. Critique the following hash functions for a domain consisting of people with at- tributes firstName, lastName, number (used to resolve identical first and last names, e.g., "John Smith 0," "John Smith 1," etc.), and age. The names are of class String and the other two attributes are of type int. a. hash function returns (age)? b. hash function returns (age) + lastName.hashCode () c. hash function returns lastName.hashCode () + firstName.hashCode () d. hash function returns lastName.hashCode () + firstName.hashCode () + number Ohiprt/shaxsnode @ 00
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
