Binary recursion

In binary recursion, the function calls itself twice in each run. As a result, the calculation depends on two results from two different recursive calls to itself. If we look at our Fibonacci sequence generation recursive function, we can easily find that it is a binary recursion. Other than this, we have many commonly used binary recursions in the programming world, such as binary search, divide and conquer, merge sort, and so on. The following image shows a binary recursion:

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset