Question: QUESTION 3 (Binary Trees/Graph/MST) === ==(5+5= 10 marks) a) Write a function inside a BST that takes an array A of type and an integer

 QUESTION 3 (Binary Trees/Graph/MST) === ==(5+5= 10 marks) a) Write a

QUESTION 3 (Binary Trees/Graph/MST) === ==(5+5= 10 marks) a) Write a function inside a BST that takes an array A of type and an integer n that denotes the size of A along with any other additional argument that is needed. At end of the function, the array should be sorted from largest to smallest number. Also, tell me what the initial call to this function will be? b) Imagine you are the leader of an international gang of smugglers. One of your gang member (John) has a very expensive diamond that he wants to deliver it to you through a series of middlemen. Each middleman will charge some amount to deliver the diamond to the next middleman. You want to get the diamond at a minimum cost. So you decide to tell John how exactly to deliver the diamond to you as shown in the table Person 1 John John John Brad Tom Micheal George Person 2 Amount Charged Brad $ 1000 Micheal $ 2000 George $1500 Tom $ 400 You $ 800 You $ 300 $600 You Since you are an underworld boss who has studied Data Structures and Algorithms, you decide to solve how the diamond will be delivered to you by modeling the problem as a graph and then applying an algorithm to it. Tell me the following i. Create a graph for this problem. (1) ii. What algorithm will apply on it? Where will you start it from? (1) Page 3/3 iii. Redraw the graph and highlight (make bold) the solution, i.e. make the edges and vertices of the solution. (3)

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!