· Say you set the key for each position p of a binary tree T equal to its pre-order rank. Under what circumstances is T a heap? In other words, what property should T have to be a heap? Discuss about such a property.
· If we are to insert “43,” “18,” and “2,” on the binary tree shown below (it’s also a heap!), what is the end result? Remember we need three steps to complete inserting in a heap: a) Place the new element in the next available position in the array. b) Compare the new element with its parent. If the new element is smaller, than swap it with its parent. c) Continue this process until either the new element’s parent is smaller than the new element or it reaches the root.
picture is attached
Consider a red-black tree (RBT) T storing 1,024 elements. What is the worst-case height of T? As you recall, the height is the black height. You do not have to be correct in terms of the answer, but try to show the reason why it should be that number
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 more
Each 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 more
Thanks 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 more
Your 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 more
By 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