Recursion can be a useful tool, if you understand how it works. Expect recursive techniques to use more memory and execution time than comparable sequential/iterative techniques. Watch your depth!
1. Review “parameter passing” in whatever textbook you’re using. (in particular make sure you understand the difference between passing by value and passing by reference)
2. Review the pages in your book that discuss “storage class” (static vs dynamic memory)
3. Solve your problem on paper first just using symbols and lines.
4. Check your TERMINATION and RECURSIVE CONDITIONS. Recursion requires 2 things: a recursive rule(s) and a termination condition!
5. Solve the simplest version of the program that you can think of first, i.e. factorial(0) or generate a fractal one level deep.
Duration : 0:9:24
Lecture 13: Dynamic programming: overlapping subproblems, optimal substructure
Lecture 23: Stock market simulation
Lecture 18: Presenting simulation results, Pylab, plotting
Lecture 10: Divide and conquer methods, merge sort, exceptions
Lecture 16: Encapsulation, inheritance, shadowing
Lecture 11: Testing and debugging
Lecture 20: Monte Carlo simulations, estimating pi
Lecture 9: Binary search, bubble and selection sorts
Lecture 7: Lists and mutability, dictionaries, pseudocode, introduction to efficiency