Can I have a hint as to how to approach the
problems?
I'll give you a few hints:
- Consider the suggested runtime of the algorithm and what
the recurrence relation for that runtime is. What does that
mean your solution looks like?
- Use props. I used cards to simulate the first problem and
different colored pens for the second problem.