## Least Common Denominator (LCD)

The lowest Common Denominator or Least Common Denominator is the Least Common Multiple of the denominators of a set of fractions. Common denominator : when… Read More »

The lowest Common Denominator or Least Common Denominator is the Least Common Multiple of the denominators of a set of fractions. Common denominator : when… Read More »

Given an array of n integers, We need to find all pairs with difference less than k Examples: Input : a[] = {1, 10, 4,… Read More »

Given two positive numbers ‘n’ and ‘m’ (n <= m) which represent total number of items of first and second type of sets respectively. Find… Read More »

Given a string S and an integer K. The task is to find lexicographically largest subsequence of S, say T, such that every character in… Read More »

Given an area of N X M. You have infinite number of tiles of size 2i X 2i, where i = 0, 1, 2,… so… Read More »

Introduction to Vampire Number and its implementation using python. Introduction In mathematics, a vampire number (or true vampire number) is a composite natural number v,… Read More »

Given an integer N, find out the count of numbers(m) that satisfy the condition m + sum(m) + sum (sum(m)) = N, where sum(m) denotes… Read More »

Given a number n, find GCD of its digits. Examples: Input : 345 Output : 1 GCD of 3, 4 and 5 is 1. Input… Read More »

This program checks whether a number n can be expressed as power of k and if yes, then to what power should k be raised… Read More »

Given a 3 X n board, find the number of ways to color it using at most 4 colors such that no two adjacent boxes… Read More »

Given a number which may be in octal or in decimal. If the number is not octal then convert it into octal then check if… Read More »

A number N is called a factorial number if it is the factorial of a positive integer. For example, the first few factorial numbers are… Read More »

You are given a rotated sorted array and your aim is to restore its original sort in place. Expected to use O(1) extra space and… Read More »

Circle sort algorithm can be visualized by drawing concentric circles on an array of integers. The elements of the array lying on the same circle… Read More »

A Happy Number n is defined by the following process. Starting with n, replace it with the sum of the squares of its digits, and… Read More »