Question: CSE 2383 Spring 2018 Exercise 4 Instructions: The Hash Table is a type of data structures that uses a mathematical function called a hash to

 CSE 2383 Spring 2018 Exercise 4 Instructions: The Hash Table is

CSE 2383 Spring 2018 Exercise 4 Instructions: The Hash Table is a type of data structures that uses a mathematical function called a hash to determine positions of values entered into the data structure. The ideal complexity of inserts, deletes, and searches is O(1) For this exercise, you will implement the following methods for a Hash Table: A function that computes the hash of a key and the linear probing function, as well as the insert function. You will also need to implement the class for the Hash Table. For bonus points, the hashing function is worth 2 points, the linear probing function is worth 3 points, and the insert is worth 5 points Note: You need to implement a partial class for testing. The data is stored as an array of the class, with the index being the hash of a key and each array element being a pointer to a Node. The node class (which can simply be a structure), should also be created and should have a key attribute and value attribute. Find a partner and write the code to complete the two methods and the partial class When submitting your work: submit it to MyCourses as a .PDF (for short answer) or.c/h file (for code solutions) before Wednesday, March 28 at 11:59 p.m. 1. Pseudocode for Node/Hash Table class Hints: Define class Node: 1. Don't overcomplicate Key: string, public Value: Integer, public //Note: typically, "value" is templated to support multiple types, this. This is simplya data structure that stores its values in an array like a heap but for simplicity let's just support integers. Define class HashTable Table: Array of Node Pointers, private Size: Integer, private 2. Use what you've learned throughout the semester. Look at examples of code already given Table(s: Integer): Constructor, public Allocate Table of size "s." Set all pointers to NULL Size is set to "s." 3. Ask Questions if confused CSE 2383 Spring 2018 Exercise 4 Instructions: The Hash Table is a type of data structures that uses a mathematical function called a hash to determine positions of values entered into the data structure. The ideal complexity of inserts, deletes, and searches is O(1) For this exercise, you will implement the following methods for a Hash Table: A function that computes the hash of a key and the linear probing function, as well as the insert function. You will also need to implement the class for the Hash Table. For bonus points, the hashing function is worth 2 points, the linear probing function is worth 3 points, and the insert is worth 5 points Note: You need to implement a partial class for testing. The data is stored as an array of the class, with the index being the hash of a key and each array element being a pointer to a Node. The node class (which can simply be a structure), should also be created and should have a key attribute and value attribute. Find a partner and write the code to complete the two methods and the partial class When submitting your work: submit it to MyCourses as a .PDF (for short answer) or.c/h file (for code solutions) before Wednesday, March 28 at 11:59 p.m. 1. Pseudocode for Node/Hash Table class Hints: Define class Node: 1. Don't overcomplicate Key: string, public Value: Integer, public //Note: typically, "value" is templated to support multiple types, this. This is simplya data structure that stores its values in an array like a heap but for simplicity let's just support integers. Define class HashTable Table: Array of Node Pointers, private Size: Integer, private 2. Use what you've learned throughout the semester. Look at examples of code already given Table(s: Integer): Constructor, public Allocate Table of size "s." Set all pointers to NULL Size is set to "s." 3. Ask Questions if confused

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!