Question: Part two is another recursive function list - to - tree that takes a list of numbers and a sorted tree and inserts all of

Part two is another recursive function list-to-tree that takes a list of numbers and a sorted tree and inserts all of the numbers from the list into the tree. This function can be given an empty list as input for the sorted tree.
List-to-tree will repeatedly call tree-insert.
Test your function with:
(list-to-tree '(22257168346773217845319)())
Returns '(22((7((7((4((3)(5)))()))(16((8((8)()))(17((19)))))))(25((34((32)(67)))))))
Your function MUST match this output for any credit.

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!