Please help two questions and give as much detail as you can.
1) Find and discuss an interesting example of recursion - thus, an example other than those presented in the readings.
Your discussion should: give citations, make it clear that this is either a head or tail recursion algorithm, and include both space and time big-O performance estimates of your example.
(2) Propose a linear representation protocol of a binary tree data structure.
An example is RPN (reverse Polish notation) where a b + c * d e f + * / is a representation of the following tree:
(the tree is in the attachment).
Sun | Mon | Tue | Wed | Thu | Fri | Sat |
---|---|---|---|---|---|---|
27 | 28 | 29 | 30 | 1 | 2 | 3 |
4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 | 12 | 13 | 14 | 15 | 16 | 17 |
18 | 19 | 20 | 21 | 22 | 23 | 24 |
25 | 26 | 27 | 28 | 29 | 30 | 31 |