Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

To implement a BTree class in C++ that allows: - the definition of the order (K) of the node (this can be implemented as a

To implement a BTree class in C++ that allows:

- the definition of the order (K) of the node (this can be implemented as a method or as a parameter directly in the constructor of the class

- A method for searching a given key "KEY" in the tree, that returns the pointer to the node that contains the KEY plus the integer index of the given key in that page or null if KEY is not present in the tree

- A method for insertions of integer numbers in the tree. This should take the value of order K into consideration, meaning that each node must store m elements where: K/2 <= m <= K

- A method for deletions of integers numbers from the tree. Remember to consider rotations and joins operations If necessary

- All three traversals: inorder, preorder, postorder

- A method to determine the height of the tree

Should also be implemented an external program that instantiates an object of this class using K = 50000 and inserts 1 million (1.000.000) DISTINCT random numbers and determines the height of the resulting tree.

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

Spatio Temporal Database Management International Workshop Stdbm 99 Edinburgh Scotland September 10 11 1999 Proceedings Lncs 1678

Authors: Michael H. Bohlen ,Christian S. Jensen ,Michel O. Scholl

1999th Edition

3540664017, 978-3540664017

Students also viewed these Databases questions

Question

7. I hardly ever expect things to go my way.

Answered: 1 week ago

Question

How do you get the deposit in transit number???

Answered: 1 week ago