Programmers involved in mathematical computations, such as mathematical induction, are probably the biggest users of recursion. You probably know some of the most common recursive problems; finding the factorial of a number and the Fibonacci series are both examples of recursive processes. In this course, staff instructor and Java expert Peggy Fisher explores programming solutions involving both of these problems. She reviews the concept of recursion, discusses approaches to solving problems using recursion, and examines some recursive examples.
- Defining recursion
- Reviewing recursive examples
- Converting decimal to binary
- Printing a LinkedList
- Writing a power function
Skill Level Intermediate
- [Instructor] Hi, I'm Peggy Fisher and welcome to Java Recursion. In this series, we will review the concept of recursion, discuss approaches to solving problems using recursion, and spend time looking at some recursive examples. It is important to understand that all recursion problems can be rewritten as iterative loops instead. There is much debate on whether using recursion is beneficial but is an important concept to understand. Recursion is probably most heavily used by programmers involved in mathematical competitions.
such as mathematical induction. There are times when using recursion is better simply for the reduction of code required to accomplish the task. Most times, recursive processes are very small in length. The concept behind recursion is taking a large complex problem and breaking it down into smaller instances of the same problem. You probably know some of the most common recursive problems such as finding the factorial of a number is usually recursive process or the infamous Fibonacci series is another example of a recursive process.
We will look at programming solutions involving both of these problems.