Answered step by step
Verified Expert Solution
Question
1 Approved Answer
task 1 java language Search dral Xdial PN Pic Share Comments WU Lab Heaps and sorting - Protected View - Saved to this PC- H
task 1 java language
Search dral Xdial PN Pic Share Comments WU Lab Heaps and sorting - Protected View - Saved to this PC- H Insert Design Layout References Mailings Review View Help PROTECTED VIEW Be cardul files from the latenet can contain viruses. Unless you need to ecit, it's safe to stay in Protected View. CS 143 Enable Editing Lab 7: Heaps and Sorting Winter 2021 Objective in this lab you will proctice the following skills: Identify and understand heap characteristics and operations land run the steps of selection and insertion sorts Hand run the steps of merge sort Usenetion, selection, merge and quick sorts on arrays and measure their execution time Task 1. Questions. (10 points, about 1 point per question) 10 19 26 31 42 27 44 Thanks to come 1.a. Is this a mi heap or a machosp? 1.b. What is the value of the root node? 1.c. What is the left child of nodc 142 1.d. What is the left child of node 20? CS 143 - Winter 2021 Type here to search O Ti I ENG 4:33 PM 2/01/201 Search dral Xdial PN Pic WU? Lab Heaps and sorting - Protected View - Saved to this PC- H Insert Design Layout References Mailings Review View Help PROTECTED VIEW Be cardul files from the latenet can contain viruses. Unless you need to ecit, it's safe to stay in Protected View. Share Comments Erable Edling le. What is the heap-order property for a mn-teap? The parent rode must have a value than either of its children 1.1. If we swapped the left and right child at node 19, would the heap-arder property still hold? 1.6. if we were going to add a node to the heen, where would it be inserted initially? (That is where would the node be incerted brore upheap swapping) 1.1. In a minheap, the parent nade must have a value smallerar equal to its children. Is this a valid min heap? 1.1. The latt child of node 26 is 44. What is the right child of node 262 1.1. Any nade added to the heap would be inserted as the right child of node 31. if the node vale was smaller than 31, what process would we use to restore the heap order? Screenshot saved The screenshot was added to your OneDrive OneDrive Type here to search O V AI ENG 4:33 PM 2/21/2021Step 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