I have attached the file below!!
Question 1 (25 pts):
Figure 1 An AVL tree
1: Redraw the tree after insert 43 in the AVL tree of Figure 1. The resulting tree must be an AVL tree.
2: What is the balance factor at the root node after the insertion?
Question 2 (25 pts):
Figure 2 A B-Tree of order 5
Using the B-tree in Figure 2,
(a) Redraw the tree after inserting 74.
(b) Redraw the tree after inserting 33 to the tree in (a).
(c) Redraw the tree after inserting 56 to the tree in (b).
Question 3 (25 pts):
Figure 3 Another B-Tree of order 5
Using the B-tree in Figure 3;
(a) Redraw the tree after deleting 22.
(b) Redraw the tree after deleting 16 from the tree in (a).
(c) Redraw the tree after deleting 4 from the tree in (b).
Question 4 (25 pts):
Rewrite function searchNode(copied below) in B-tree class(bTree.h) by using binary search to search the node. Write a C++ code to ask user to enter a positive integer list ending with -999, build a b-tree of order 5. Also, ask the user to enter a number to search and display if the number is found in the tree.
Submit the source code, and copy and paste the screenshot of the output here.
template
void bTree
(bTreeNode
const recType& item,
bool& found, int& location)
{
found = false;
int low = 0;
int high = current->recCount – 1;
while (low <= high) {
int mid = (high – low) / 2;
if (item == current->list[mid])
{
found == true;
location = mid;
}
else if (item < current->list[mid])
high = mid – 1;
else
low = mid + 1;
}
}
At Elite Custom Essays, we take academic integrity seriously. All our papers are 100% plagiarism-free and crafted without AI assistance, ensuring original, high-quality work every time. To give you full confidence in our services, we provide complimentary plagiarism and AI detection reports with every order. Whether it’s an essay, research paper, or assignment, you can trust that your work is authentic and tailored to your requirements. Our goal is to help you achieve academic success while maintaining honesty and credibility. Experience worry-free, professionally written papers backed by detailed verification reports—completely free of charge.
Delivering a high-quality product at a reasonable price is not enough anymore.
That’s why we have developed 5 beneficial guarantees that will make your experience with our service enjoyable, easy, and safe.
You have to be 100% sure of the quality of your product to give a money-back guarantee. This describes us perfectly. Make sure that this guarantee is totally transparent.
Read moreEach paper is composed from scratch, according to your instructions. It is then checked by our plagiarism-detection software. There is no gap where plagiarism could squeeze in.
Read moreThanks to our free revisions, there is no way for you to be unsatisfied. We will work on your paper until you are completely happy with the result.
Read moreYour email is safe, as we store it according to international data protection rules. Your bank details are secure, as we use only reliable payment systems.
Read moreBy sending us your money, you buy the service we provide. Check out our terms and conditions if you prefer business talks to be laid out in official language.
Read more