Question: Please use C language(not C++ or Java) to write a function based on follow question: Write a function list print_reverse (link root) that takes a
Please use C language(not C++ or Java) to write a function based on follow question:

Write a function list print_reverse (link root) that takes a binary search tree (BST) as an argument and returns a list with the items in the tree in reverse order. If it helps, you can assume the following list functions are provided: - list new_list() - creates and returns an empty list. VO void add (list L, int x),-adds integer x to the end of the given list, L. You can use a helper function if you want. The nodes and links are defined as follows. (Do not worry about how the list is represented and implemented.) typedef struct node linki struct node int data; link lefti link right; )i a) G points) Fill i the time complexity of the code you wrote for par b). CAssume the tre as N nodes) b) (1 points) Write the complete code for the function. It should not crash. Do not use any global variables. 3 points wll be deducted if any global variable is used
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
