Question: Please help with my homework using Python; please DO NOT use classes in the code just use global or functions to do the task; thanks!

Please help with my homework using Python; please DO NOT use classes in the code just use global or functions to do the task; thanks!

the tree should look like this

Please help with my homework using Python; please DO NOT use classes

and here is the input

the list is a 2d array

g=[[1,2,3],

[2,4,5],

[4, 0, 0],

[5,0, 0],

[3,0,6],

[6,0,0]

]

The purpose is to find the height of the tree using recursion; please do not hard code the length of the tree but rather it should check which side is the longest and check the height of that side.

I appreciate your hard work and I promise to upvote it as long as it works and solves the problem.

thanks!

600 The tree should looks like 1 3 N 2 45 3 06 4 6 5 0 0 0 0 0 0

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!