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

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

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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!