# Category: Number

## Reverse a number using recursion

Problem: Print reverse of a number in Java using recursion We will use simple recursion to print reverse of a number. In each call we will print number % 10 …

## Reverse array in subset of N in Java

Problem: Reverse array in subset of N. For example: input: Array = , N = 3 output: The array is divided in 3 subsets , and . Now …

## Jumbled number: Check if a number is jumbled number

Problem: Write a program to check if a given number is jumbled number. What is a jumbled number? A jumbled number is a number in which for every digit, it’s …

## Find next greater number with same set of digits in Java

Problem: Given a number, find next greater number with the same set of digits as original number. For example, if input number is 1234, then output should be 1243 if …

## Reverse a number using stack in Java

Problem: Reverse a number using stack data structure. Stack is a LIFO (Last In First Out) data structure. i.e. last element pushed onto the stack is popped out first. Java provides in-built stack …

## Find a maximum number that can be formed from digits of a number

Problem: Write a Java program to find a maximum number that can be formed from the digits of a given number. For example: If the given number is 38293367, then …

## Java program for Fibonacci series

Problem: Write a Java program to print Fibonacci series. Here we have to print first ‘n’ numbers of Fibonacci series. This is a college level program and could be asked …

## Nth Fibonacci number in Java

Problem: Find nth Fibonacci number in Java. Write a Java program to find nth Fibonacci number. What is Fibonacci series? In mathematics, following is the Fibonacci series. (We will take …

## x raised to power y in Java

Problem: Find x raised to power y in Java without using in built functions. This program is asked in entry level interviews to check knowledge of algorithms. x raised …

## GCD of two numbers in Java

Problem: Find GCD of given numbers in Java. This is a college level program and asked in entry level interviews. This program is asked to check your arithmetic ability and knowledge …