Identifying multiple recursion
Multiple recursion is a very powerful technique that forms the basis of backtracking and dynamic programming and can solve a wide variety of problems. Most problems that are solved by multiple recursion are medium or hard problems, where the problem can be broken down into multiple subproblems at every stage, and the final solution is created by aggregating results from all the subproblems. In some cases, the results of processing data in each step may be passed down to successive recursive calls as state information necessary for further processing. The results in the case of multiple recursion are usually built in the bottom-to-top order.
Most recursive problems where the solution is created by combining results from multiple smaller subproblems that must be explored simultaneously can be solved by multiple recursion.
Liking the course? Check our discounted plans to continue learning.