## Recursive program to print all numbers less than N which consist of digits 1 or 3 only

Given an integer N, the task is to print all the numbers ≤ N which have their digits as only 1 or 3. Examples: Input:… Read More »

- Check if item can be measured using a scale and some weights
- Recursive program to insert a star between pair of identical characters
- Recursive program to print all numbers less than N which consist of digits 1 or 3 only
- Tail recursion to calculate sum of array elements.
- Number of ways to divide a given number as a set of integers in decreasing order

Given an integer N, the task is to print all the numbers ≤ N which have their digits as only 1 or 3. Examples: Input:… Read More »

Given a string with repeated characters, we have to insert a star i.e.” * “ between pair of adjacent identical characters using recursion. Examples: Input… Read More »

Given some weights of masses a0, a1, a2, …, a100, a being an integer, and a weighing scale where weights can be put on both… Read More »

Given two numbers and . The task is to find the number of ways in which a can be represented by a set such that… Read More »

Given an array A[] we need to find sum of its elements using Tail Recursion Method. We generally want to achieve tail recursion (a recursive… Read More »

Basics – Recursion Recursive Functions Tail Recursion Strings – Given a string, print all possible palindromic partitions Check if a number is Palindrome Print all… Read More »

Write a tail recursive function for calculating the n-th Fibonacci number. Examples : Input : n = 4 Output : fib(4) = 3 Input :… Read More »

What is Recursion? The process in which a function calls itself directly or indirectly is called recursion and the corresponding function is called as recursive… Read More »

We have discussed (in tail recursion) that a recursive function is tail recursive if recursive call is the last thing executed by the function. filter_none… Read More »

What is tail recursion? A recursive function is tail recursive when recursive call is the last thing executed by the function. For example the following… Read More »