Question: ( 2 0 points ) Design a divide - and - conquer algorithm for finding the largest key in a binary tree ( not a

(20 points) Design a divide-and-conquer algorithm for finding the largest key in a binary tree (not a
binary search tree). The algorithm returns the largest key if the tree is not empty; otherwise, returns -1.
a.(5 points) What is the recurrence relationship?
b.(15 points) Code implementation. Find the largest elements in the binary tree shown below. Show the
output.
c. what is the time efficiency class of your algorithm?
( 2 0 points ) Design a divide - and - conquer

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 Programming Questions!