![Question: 10 Solution: A class that is inherited is called a Parent Class ChildClass. The class that does the inheriting is c](//img.homeworklib.com/questions/53bfb390-2dad-11eb-9545-ab3653364365.png?x-oss-process=image/resize,w_560)
![Question: 13 Solution For a binary tree if the key field follows all the keys of left sub tree and precedes all the node of r](//img.homeworklib.com/questions/545e95b0-2dad-11eb-85e1-4f7162d12ed7.png?x-oss-process=image/resize,w_560)
![Question: 14 Solution: In order to remove the root node from the heap first replace the last leaf node of the heap with the r](//img.homeworklib.com/questions/54e460c0-2dad-11eb-aa3c-7f9779fd83de.png?x-oss-process=image/resize,w_560)
![17 19 15 14 18 14 21 25 9 Now, remove the node 25 and balance the heap that has maximum value of root.](//img.homeworklib.com/questions/5578a6b0-2dad-11eb-a07c-57ed4753d2c9.png?x-oss-process=image/resize,w_560)
![17 19 21 15 14 18 14 Therefore, the heap array of the given heap is [22, 22, 17, 19,21, 14, 15, 18, 14, 11, 3,9].](//img.homeworklib.com/questions/55f9f220-2dad-11eb-a3d9-d9ce466ad50f.png?x-oss-process=image/resize,w_560)
Question: 10 Solution: A class that is inherited is called a Parent Class ChildClass. The class that does the inheriting is called a Question: 11 Solution: Breadth first search the nodes in the horizontal direction, check for every edge which are on the same level. Whereas Depth first search follows one path until the end and if the node to be found is not reached then backtracking is followed to find the node Therefore, the statement if not correct. Question: 12 Solution: Base class constructor are called first because the derived class is inherited from the base class and field initializers are called in order from most derived to least derived classes. Therefore, the constructor ofbase class is called first. Hence, Base class constructor is correct
Question: 13 Solution For a binary tree if the key field follows all the keys of left sub tree and precedes all the node of right sub tree then the key field acts like a root node and left sub tree and right sub tree will have same number ofnod es Hence, the tree is balanced tree.
Question: 14 Solution: In order to remove the root node from the heap first replace the last leaf node of the heap with the rootnode. Node 25 is replaced by node 11. Then, remove the node 25 from the last node position and Balance the heap. 25 17 19 15 14 18 14 21 Replace the node 25 with the node
17 19 15 14 18 14 21 25 9 Now, remove the node 25 and balance the heap that has maximum value of root.
17 19 21 15 14 18 14 Therefore, the heap array of the given heap is [22, 22, 17, 19,21, 14, 15, 18, 14, 11, 3,9].