Question: a. Write a recursive LISP function that will reverse the elements of a list. (Do not use the built-in reverse function.) What is the complexity
a. Write a recursive LISP function that will reverse the elements of a list. (Do not use the built-in reverse function.) What is the complexity of your implementation? It is possible to reverse a list in linear time; can you do so?
b. Write a LISP function that will take a list nested to any depth and print the mirror image of that list. For instance, the function should have the behavior:
> (mirror ’((a
b) (c (d e))))
(((e
d) c) (b a))
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
