Q1/ You have an array representation of tree with the following data in array (T) that are starting from location Zero (T[O]) 44, 13, 52, 33, 67, 22, 56, 11, 19. (1) Draw the corresponding tree, showing the rules. (2) What is the depth of the tree? (3) What is the maximum size of array (T)? (4) Who is the parent of the node of value (22)?

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question
Q1/ You have an array representation of tree with the following data in array (T) that are starting from location
Zero (T[0])
44, 13, 52, 33, 67, 22, 56, 11, 19.
(1) Draw the corresponding tree, showing the rules.
(2) What is the depth of the tree?
(3) What is the maximum size of array (T)?
(4) Who is the parent of the node of value (22)?
C12/ Use the following data to build Min Heap Tree?
35, 92, 23, 74, 13, 11.
Then insert 17.
Q3/ Suppose that we first insert an element x into a binary search tree that does not already contain x. Suppose
that we then immediately delete x from the tree. Will the new tree be identical to the original one? If yes give the
reason in no more than 3 sentences. If no give an example. Draw pictures if you necessary.
Q4/ Consider the directed graph G1 with the set of vertices (A; B;C; D; Eg and eight weighted edges, given by
the following triples:
(A; B; 9); (A;C; 2); (A; D; 6); (C; D; 3); (C; E; 1); (D; B; 2); (E; B; 3); (E; D; 1):
For example, the triple (A; B; 9) says there is an edge from A to B with weight 9.
Make a drawing of the graph with sufficient space among the vertices. And run Dijkstra's algorithrn on this graph
with start vertex A
Transcribed Image Text:Q1/ You have an array representation of tree with the following data in array (T) that are starting from location Zero (T[0]) 44, 13, 52, 33, 67, 22, 56, 11, 19. (1) Draw the corresponding tree, showing the rules. (2) What is the depth of the tree? (3) What is the maximum size of array (T)? (4) Who is the parent of the node of value (22)? C12/ Use the following data to build Min Heap Tree? 35, 92, 23, 74, 13, 11. Then insert 17. Q3/ Suppose that we first insert an element x into a binary search tree that does not already contain x. Suppose that we then immediately delete x from the tree. Will the new tree be identical to the original one? If yes give the reason in no more than 3 sentences. If no give an example. Draw pictures if you necessary. Q4/ Consider the directed graph G1 with the set of vertices (A; B;C; D; Eg and eight weighted edges, given by the following triples: (A; B; 9); (A;C; 2); (A; D; 6); (C; D; 3); (C; E; 1); (D; B; 2); (E; B; 3); (E; D; 1): For example, the triple (A; B; 9) says there is an edge from A to B with weight 9. Make a drawing of the graph with sufficient space among the vertices. And run Dijkstra's algorithrn on this graph with start vertex A
Expert Solution
steps

Step by step

Solved in 2 steps with 1 images

Blurred answer
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY