Loading...

Write a recursive function that returns the sum of the digits of a given integer.

PROBLEM :- Sum of digits (recursive) Send Feedback Write a recursive function that returns the sum of the digits of a given integer. Input f...
Read More

Check whether a given String S is a palindrome using recursion. Return true or false.

PROBLEM :- Check Palindrome (recursive) Send Feedback Check whether a given String S is a palindrome using recursion. Return true or false. ...
Read More

Given k, find the geometric sum i.e.

PROBLEM :- Geometric Sum Send Feedback Given k, find the geometric sum i.e. 1 + 1/2 + 1/4 + 1/8 + ... + 1/(2^k) using recursion. Input form...
Read More

Given an integer N, count and return the number of zeros that are present in the given integer using recursion.

PROBLEM :- Count Zeros Send Feedback Given an integer N, count and return the number of zeros that are present in the given integer using re...
Read More

Given two integers M & N, calculate and return their multiplication using recursion. You can only use subtraction and addition for your calculation. No other operators are allowed.

PROBLEM :- Multiplication (Recursive) Send Feedback Given two integers M & N, calculate and return their multiplication using recursion....
Read More

Given an array of length N and an integer x, you need to find all the indexes where x is present in the input array. Save all the indexes in an array (in increasing order). Do this recursively. Indexing in the array starts from 0.

PROBLEM :- All Indices of Number Send Feedback Given an array of length N and an integer x, you need to find all the indexes where x is pres...
Read More

Given an array of length N and an integer x, you need to find and return the last index of integer x present in the array. Return -1 if it is not present in the array. Last index means - if x is present multiple times in the array, return the index at which x comes last in the array. You should start traversing your array from 0, not from (N - 1). Do this recursively. Indexing in the array starts from 0.

PROBLEM :- Last Index of Number Send Feedback Given an array of length N and an integer x, you need to find and return the last index of int...
Read More

Given an array of length N and an integer x, you need to find and return the first index of integer x present in the array. Return -1 if it is not present in the array. First index means, the index of first occurrence of x in the input array. Do this recursively. Indexing in the array starts from 0.

PROBLEM :- First Index of Number Send Feedback Given an array of length N and an integer x, you need to find and return the first index of i...
Read More

Given an array of length N and an integer x, you need to find if x is present in the array or not. Return true or false. Do this recursively.

PROBLEM :- Check Number Send Feedback Given an array of length N and an integer x, you need to find if x is present in the array or not. Ret...
Read More

Given an array of length N, you need to find and return the sum of all elements of the array. Do this recursively.

Sum of Array Send Feedback PROBLEM :- Given an array of length N, you need to find and return the sum of all elements of the array. Do this ...
Read More

Given the code to find out and return the number of digits present in a number recursively. But it contains few bugs, that you need to rectify such that all the test cases should pass.

PROBLEM :- Number of Digits Send Feedback Given the code to find out and return the number of digits present in a number recursively. But it...
Read More