Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Task 1 In this task, you will need to compare how efficient it is to search three different data structures using a large data set.

Task 1 In this task, you will need to compare how efficient it is to search three different data structures using a large data set. The structures we will use are list (C++ Standard Library linked list implementation), binary search tree, and a balanced BST of your choice (Adelson-Velsky and Landis Tree (AVL) or red-black tree). Step 1 Implement a binary search tree with integer-based nodes.

Step 2 Extend your BST by making a sub class of AVL or red-black tree utilising inheritance. Step 3 #Include list in your main source file. Now insert 150,000 random numbers into a list, a BST, and a balanced BST (AVL or red-black tree). Make sure the same numbers are inserted into each. Reference the pseudocode below for guidance: Initialise list numbers Initialise BST bst Initialise BalancedBST bbst For num 1 to 150000 Set R to random number Insert R into numbers Insert R into bst Insert R into bbst Step 4 Present the user with a simple menu: Select an option: 1) Search for a number all data structures 2) Exit Enter in option (12): If the user selects 1, the user is asked to input a number. This number is searched for in the list, binary search tree, and balanced binary search tree, recording how long it takes in milliseconds to do each. If the number is found in the structures, display the time taken to find it in each structure. If not, let the user know that the number could not be found in any of them and still show the time to complete the search on each structure. Tried the following solution listed in this link: https://www.chegg.com/homework-help/questions-and-answers/task-1-task-need-compare-efficient-search-three-different-data-structures-using-large-data-q107724120?recommendationId=386ab5bd-1f11-42e9-bf34-25a4277f4a50®ionName=recent%20activity§ionId=372bc76d-3d22-433e-a753-bbe6a25d8f89 The code in BinarySearchTree.h file throws an error with inorderHelper(root);

The code in AVLTree.h file throws an error throws lots of errors.

please check, I've trying the code visual studio.

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

Concepts of Database Management

Authors: Philip J. Pratt, Mary Z. Last

8th edition

1285427106, 978-1285427102

More Books

Students also viewed these Databases questions