logo Use SA10RAM to get 10%* Discount.
Order Now logo

Ask This Question To Be Solved By Our ExpertsGet A+ Grade Solution Guaranteed

expert
Alfred DodddEconomics
(5/5)

609 Answers

Hire Me
expert
Jason ParkerCriminology
(5/5)

548 Answers

Hire Me
expert
Yusuf PathanStatistics
(5/5)

745 Answers

Hire Me
expert
Hemidov MuradManagement
(5/5)

648 Answers

Hire Me
C++ Programming

reate a binary search tree and hash table data structures to store strings. Both structures should have functions to add and remove elements.

INSTRUCTIONS TO CANDIDATES
ANSWER ALL QUESTIONS

INTRODUCTION

In lectures, we have discussed the benefits of using binary search trees and hash tables to store information. In this assignment, you will implement both and compare their performances in terms of speed of access.

ASSIGNMENT TASK

You are required to create a binary search tree and hash table data structures to store strings. Both structures should have functions to add and remove elements. The classes MUST be implemented as class templates. The binary search tree class must be called BSTree and will use as nodes instances of BTNode. The hash table class must be named HTable.

You will be provided a demo file and your classes need to interface with it. The binary search tree contents must be printed using an inorder traversal.

The hash table class must store the items in an array of size 150, and the contents can be printed from position 0 to n-1, but only for those positions that contain a valid entry. The hash function used must sum up the ASCII values of each character in the string and return the result of that sum mod (%) 150:

int hashfunc(string value)

{

    int addResult = 0;

    // put you code here to add up the ASCII codes

    // of all characters in value and store in the

    // integer variable addResult

    return addResult % 150;

}

Related Questions

. The fundamental operations of create, read, update, and delete (CRUD) in either Python or Java

CS 340 Milestone One Guidelines and Rubric  Overview: For this assignment, you will implement the fundamental operations of create, read, update,

. Develop a program to emulate a purchase transaction at a retail store. This  program will have two classes, a LineItem class and a Transaction class

Retail Transaction Programming Project  Project Requirements:  Develop a program to emulate a purchase transaction at a retail store. This

. The following program contains five errors. Identify the errors and fix them

7COM1028   Secure Systems Programming   Referral Coursework: Secure

. Accepts the following from a user: Item Name Item Quantity Item Price Allows the user to create a file to store the sales receipt contents

Create a GUI program that:Accepts the following from a user:Item NameItem QuantityItem PriceAllows the user to create a file to store the sales receip

. The final project will encompass developing a web service using a software stack and implementing an industry-standard interface. Regardless of whether you choose to pursue application development goals as a pure developer or as a software engineer

CS 340 Final Project Guidelines and Rubric  Overview The final project will encompass developing a web service using a software stack and impleme

Get Free Quote!

269 Experts Online