Write a java program to reverse a string using recursion. In this tutorial, I am going to explain how to write a java code which reverse an input string using recursion. I have also added the video at the end of this tutorial.
For example :
Input String: Object
Output String: tcejbO
Write a java program to find sum of digits of a number using recursion. Given a number, Write a java code to calculate sum of digits of a number using recursion.
For example –
Input number : 123
Output : 6 (1 + 2 + 3)
In my previous tutorial, I have explained how to find sum of digit of a number using iterative approach. In this tutorial, we are going to learn how we can do it using recursion.
Write a java program to find largest of three numbers using ternary operator in java. Given a three input numbers, we have to write a java code to print largest of three numbers using ternary operator.
Suppose, if we have three numbers a, b and c. If a is greater than b and c then a is the largest of three numbers. Similarly, if b is greater than a and c then b is the largest of three numbers else c is largest.
Write a program to implement Binary search using recursion in java. In this tutorial, we are going to implement binary search algorithm using recursion in Java. In my previous tutorial, i have explained how to implement binary search in java using iterative approach.
Write a java program to reverse each words of a string. Suppose, If an input string is Java Programming then the output string should be avaJ gnimmargorP.
Write a java program to check Armstrong number. In this program, we are going to write a java code which checks whether a number is Armstrong or not.
Let’s first understand what is Armstrong number?
Write a java program to find missing number in array. Given an array of n-1 integers and these integers are in the range of 1 to n. One of the integer is missing from an array. We have to write an efficient java code to find missing number from an array. An array does not contains any duplicates.
Write a program to implement Binary Search in Java. In this tutorial, we are going to implement a binary search algorithm in Java. Before implementing this algorithm, let’s first understand what is binary search and how it works.
Write a java program to find the second highest number in an array. Given an unsorted array, we have to write a java code to find the second highest number in an array.
Write a Java program to find GCD of two numbers using Recursion. Given two input integers, we have to write a code to find GCD of two numbers using recursion. For this program, I assume you are familiar with the concept of recursion. If you don’t know about recursion then check my previous post on recursion vs iteration.