Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Your objective is to implement your own Dictionary (aka a hash table). This table will only contain keys (no auxiliary/satellite data, commonly called values). You
Your objective is to implement your own Dictionary (aka a hash table). This table will only contain keys (no auxiliary/satellite data, commonly called "values"). You will use a simple String array as your keys following Create a public class called Dictionary that contains the following operations void insort (koyeris the specified key into the dictionary boolean delete (key) deletes the key from the dictionary and returns true. If key is not found, no deletion occurs and the function returns false. search (key) searches for the given key in the dictionary and returns the bucket index if found, 1 if not ound int String toString) Override to return a string representation of the dictionary. This should have vertical bars (aka "pipes") between keys and should use triple underscore for null buckets (refer to the sample output below) For insertion, you must use double hashing from the notes. For hashing use the following The prehash function will be Java's built-in hashCode() function. The primary hash function will use the simple division method . . The secondary hash function will use the one from the notes with c 3. Your objective is to implement your own Dictionary (aka a hash table). This table will only contain keys (no auxiliary/satellite data, commonly called "values"). You will use a simple String array as your keys following Create a public class called Dictionary that contains the following operations void insort (koyeris the specified key into the dictionary boolean delete (key) deletes the key from the dictionary and returns true. If key is not found, no deletion occurs and the function returns false. search (key) searches for the given key in the dictionary and returns the bucket index if found, 1 if not ound int String toString) Override to return a string representation of the dictionary. This should have vertical bars (aka "pipes") between keys and should use triple underscore for null buckets (refer to the sample output below) For insertion, you must use double hashing from the notes. For hashing use the following The prehash function will be Java's built-in hashCode() function. The primary hash function will use the simple division method . . The secondary hash function will use the one from the notes with c 3
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started