Question: DATA STRUCTURE AND ALGORITHM : GRAPH AND HEAPS 1. Referring to figure below, find:- a) all nodes adjacent to node A, F, G. b) The
DATA STRUCTURE AND ALGORITHM : GRAPH AND HEAPS



1. Referring to figure below, find:- a) all nodes adjacent to node A, F, G. b) The Breadth-First Traversal starting from vertex A c) The Depth-First Traversal, starting from vertex A. A B ) D E I G F 2. Using array implementation, show the left and right children of 32 and 27 in the heap below. Also show the left children of 14 and 40. [0] [1] [2] [3] [4] [5] [6] [7] 40 27 32 15 14 20 25 11 3. Draw the binary tree from data above that represents the heap. 4. Repair the following broken heap to fulfil the max-heap properties. Draw each step of the reheap process. 44 23 32 13 11 25 21 45 5. Insert node 52 into the following Heap. Repair the Heap after the insertion to fulfil the max-heap properties. Draw each step of the reheap process. 56 50 44 30 32 25 21 11
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
