5A 23,8 62,F 24.0 34,M 75,G 101. 99,0 40년 83 N SA 23.8 62 240 34M 75,6 101, 9.D 40.5 13.N Use the Heap-based Priority

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899604
Joined: Mon Aug 02, 2021 8:13 am

5A 23,8 62,F 24.0 34,M 75,G 101. 99,0 40년 83 N SA 23.8 62 240 34M 75,6 101, 9.D 40.5 13.N Use the Heap-based Priority

Post by answerhappygod »

 1
1 (13.31 KiB) Viewed 39 times
 2
2 (51.61 KiB) Viewed 39 times
 3
3 (57.14 KiB) Viewed 39 times
5A 23,8 62,F 24.0 34,M 75,G 101. 99,0 40년 83 N

SA 23.8 62 240 34M 75,6 101, 9.D 40.5 13.N Use the Heap-based Priority Queue shown above for this activity. The element stored in each node consists of a key- data pair: the number is the key, the letter is the data. For the nodes that look empty, both key and data are null. This question is copyrighted. © 2022 Prof. Margaret Bleichman. For this activity, you will show how the heap changes during one removeMin(). Draw this operation in stages, showing a new version of the tree every time anything changes, i.e. after removal of the nodes and after each swap. Show each stage of the removeMin, including down-heap bubbling, until the operation is complete. Use the attached Word document for this activity.

raniu w now the changes at caur stays. Tou nouiu make a copy of the tree for each change. For example, on the first tree, circle the nodes that will be deleted and show the swap with the key-data pair in the root. On the next tree, cross out the nodes that are deleted and show the new links made between nodes. When you do a swap, cross out the old key/data pair and write in the new key/data pair. Remember to do down-heap bubbling! remove Min() involves deleting two nodes, and returning the minimum key/data pair, but we don't remove the root (unless it is the only node with data in the tree, which is not the case here.) In your final tree diagram: • show the key/data pair that is returned by this removeMin() • label the new Insertion Node • label the new Last Node Submit a photo of your document showing the tree in every stage until the removeMin is complete.
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply