## Java Program for Decimal to Binary Conversion

Given a decimal number as input, we need to write a program to convert the given decimal number into equivalent binary number. Examples: Input :… Read More »

## Java Program for Stooge Sort

The Stooge sort is a recursive sorting algorithm. It is defined as below (for ascending order sorting). Step 1 : If value at index 0… Read More »

## Java Program for GCD of more than two (or array) numbers

The GCD of three or more numbers equals the product of the prime factors common to all the numbers, but it can also be calculated… Read More »

## Java Program for Recursive Insertion Sort

Insertion sort is a simple sorting algorithm that works the way we sort playing cards in our hands. Below is an iterative algorithm for insertion… Read More »

## Java Program for Recursive Bubble Sort

Background : Bubble Sort is the simplest sorting algorithm that works by repeatedly swapping the adjacent elements if they are in wrong order. Following is… Read More »

## Java Program for Cycle Sort

Cycle sort is an in-place sorting Algorithm, unstable sorting algorithm, a comparison sort that is theoretically optimal in terms of the total number of writes… Read More »

## Java Program for nth multiple of a number in Fibonacci Series

Given two integers n and k. Find position the n’th multiple of K in the Fibonacci series. Examples: Input : k = 2, n =… Read More »

## Java Program for Maximum height when coins are arranged in a triangle

We have N coins which need to arrange in form of a triangle, i.e. first row will have 1 coin, second row will have 2… Read More »

## Java Program for Common Divisors of Two Numbers

Given two integer numbers, the task is to find the count of all common divisors of given numbers? Input : a = 12, b =… Read More »

## Java Program for Linear Search

Problem: Given an array arr[] of n elements, write a function to search a given element x in arr[]. Java filter_none edit close play_arrow link… Read More »

## Java Program for Number of elements with odd factors in given range

Given a range [n, m], find the number of elements that have odd number of factors in the given range (n and m inclusive). Examples:… Read More »

## Java Program to check Armstrong Number

Given a number x, determine whether the given number is Armstrong number or not. A positive integer of n digits is called an Armstrong number… Read More »

## Java Program for BogoSort or Permutation Sort

BogoSort also known as permutation sort, stupid sort, slow sort, shotgun sort or monkey sort is a particularly ineffective algorithm based on generate and test… Read More »

## Java Program for Odd-Even Sort / Brick Sort

This is basically a variation of bubble-sort. This algorithm is divided into two phases- Odd and Even Phase. The algorithm runs until the array elements… Read More »

## Java Program for Gnome Sort

Algorithm Steps If you are at the start of the array then go to the right element (from arr[0] to arr[1]). If the current array… Read More »