This lecture is mainly about recursion. You've probably all heard of recursion, and in all likelihood think of it as a rather obscure and highly inefficient programming technique. It is neither!
Recursion is your friend!Powerful friends can get you what you want simply and efficiently, but they should be treated with care lest they turn on you and get you in a heap of trouble instead.
Recursion is powerful!
Recursion is more than just a programming technique. It has two other uses in computer science and software engineering, namely:
So even if, for whatever reason (legitimate or unfounded prejudice), you choose not to use recursion as a programming technique, you should always consider its use whenever you are describing or solving a problem.
We will look at these three uses of recursion one by one.