Some recursive functions don't just have one call to themself, they have two (or more). Functions with two recursive calls are referred to as binary recursive functions. The mathematical combinations operation is a good example of a function that can quickly be implemented as a binary recursive function.
Print All Combinations of subset of size K from Given Array. Objective: ... We will start with currentLength =0 and do the recursive calls for both the options mentioned in the previous step. ... Sliding Window Algorithm (Track the maximum of each subarray of size k)
Combinations recursive algorithm
Recursive method to find all permutations of a String : Recursive Method « Class Definition « Java Tutorial
Recursion is the key here. Divide the N into N/2 and N/2 (Count for open and closed parentheses ). Select the open parentheses, add it to the result string and reduce its count and make a recursive call. Select the close parentheses, add it to the result string and reduce its count and make a recursive call.
Absolutely NO recursion shall be used. It's a well-known fact that iterative algorithms (using loops) are much more efficient than recursive algorithms that do the same thing. A true recursive function is slower and will consume more system resources (especially memory) than its iterative counterpart.