Hash Table with Chaining for Phone Number Word Representation Project
VerifiedAdded on 2019/09/16
|4
|1007
|447
Homework Assignment
AI Summary
This assignment requires the implementation of a hash table with chaining to convert phone numbers into word-based representations. The program should take a 10-digit phone number as input and output its word-based equivalent, if one exists, considering various possibilities for 10, 7, 3, and 4-digit word representations. The solution involves creating a hash table of prime size M, using a specific hash function, and handling collisions through chaining. The program must handle cases where a full 10-digit word representation is available, followed by 7-digit, 3-digit, and 4-digit representations, printing all possible word combinations. The assignment includes requirements for pseudocode, runtime analysis, and code testing. The hash table should be dynamically resized using rehashing if collisions become excessive. The solution should effectively search for word representations based on the given phone number and the words stored in the hash table.
1 out of 4