Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

image text in transcribed

image text in transcribed

image text in transcribed

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Build It For The Real World A Database Workbook

Authors: Wilson, Susan, Hoferek, Mary J.

1st Edition

0073197599, 9780073197593

More Books

Students also viewed these Databases questions

Question

nwan used in hudnetina

Answered: 1 week ago

Question

Address an envelope properly.

Answered: 1 week ago

Question

Discuss guidelines for ethical business communication.

Answered: 1 week ago