Java Program to Implement Euclid GCD Algorithm using Recursion

The Euclidean algorithm calculates the greatest common divisor (GCD) of two number a and b. The greatest common divisor g is the largest natural number that divides both a and b without leaving a remainder. Synonyms for the GCD include the greatest common factor (GCF), the highest common factor (HCF), the highest common divisor (HCD), … Continue reading Java Program to Implement Euclid GCD Algorithm using Recursion

Java program to find factorial of given number using recursion

Recursion  is a method where the solution to a problem depends on solutions to smaller instances of the same problem.One of the classic problems for introducing recursion is calculating the factorial of an integer. The factorial of any given integer — call it n  — is the product of all the integers from 1 to … Continue reading Java program to find factorial of given number using recursion