Answered step by step
Verified Expert Solution
Link Copied!

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

image text in transcribed

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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Practical Azure SQL Database For Modern Developers Building Applications In The Microsoft Cloud

Authors: Davide Mauri, Silvano Coriani, Anna Hoffma, Sanjay Mishra, Jovan Popovic

1st Edition

1484263693, 978-1484263693

More Books

Students also viewed these Databases questions

Question

f. Did they change their names? For what reasons?

Answered: 1 week ago