***Make sure to explain your answers***
***Will give an upvote if can do all***
1)
2)
3)
Given a binary-max heap. The elements are stored in an arrays as 25, 14, 16, 13, 10, 8, 12. What is the content of the array after 24 was inserted to the heap? 25, 24, 16, 14, 10, 8, 12, 13 25, 24, 16, 14, 13, 10, 8, 12 25, 14, 16, 13, 10, 8, 12, 24 25, 24, 16, 14, 13, 8, 10, 12
Consider a binary max-heap implemented using an array. Which one of the following array represents a binary max-heap? 10, 8, 6, 4, 5, 1, 2 10, 5, 6, 4, 8, 2, 1 10, 8, 5, 4, 2, 6, 1 10, 8, 2, 5, 4, 6, 1
Consider the following binary search tree, 14 1 2 16 71 5 1 4 We want to remove the root and replace it with a node from the left subtree. What would be the new root to maintain the BST properties.
***Make sure to explain your answers*** ***Will give an upvote if can do all*** 1) 2) 3)
-
- Site Admin
- Posts: 899603
- Joined: Mon Aug 02, 2021 8:13 am