Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Answer only 4 questions out of 5 . You are not allowed to answer ALL questions. Question 1 : ( 2 5 points ) Heap
Answer only questions out of You are not allowed to answer ALL questions. Question : points Heap Sort
Sort the following list using Heap Sort
table
Hint: you must show the steps in detail exactly as it's explained in the class. You must show the insertion of each element in the array and tree while you preserve the property of max heap. Property of max heap: the root is the largest than its children. Then, delete all the elements and store them in another array and print that array. That array should have sorted values. In the max heap, only the root is deleted.
Question : points Insert the following keys into AVL tree: Hint: you must preserve the property of AVL after you insert each element. The property of AVL is a balanced binary tree such that each node has a balance factor in the range of You must show the balanced factor for each node after you insert a new key. You also must show if the tree is balanced or unbalanced. If it's unbalanced, show the type of unbalanced case and how you fix it
Question : points Binary Search Tree BST
Given the below binary search tree, answer AC
A points Traverse the tree usiriy inorder, preorder, and postorder
Hint: inorder: left root right, preorder: root left right, postorder: left right root
B points Write the pseudo code to delete then draw the tree.
C points Write the pseudo code to delete then draw the treE
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started