##
Series with largest GCD and sum equals to n
October 9, 2017

Given an integer n, print m increasing numbers such that the sum of m numbers is equal to n and the GCD of m numbers… Read More »

October 9, 2017

Given an integer n, print m increasing numbers such that the sum of m numbers is equal to n and the GCD of m numbers… Read More »

Given a set of characters generate all possible passwords from them. This means we should generate all possible permutations of words using the given characters,… Read More »

October 8, 2017

Given a natural number n, find the number of ways in which n can be expressed as a sum of natural numbers when order is… Read More »

Given an array of n integers, we need to find the no. of ways of choosing pairs with maximum difference. Examples: Input : a[] =… Read More »

Given an array containing only 0s and 1s. For each index ‘i‘(0 index), find length of the longest alternating sub-array starting from ‘i‘ to ‘j‘… Read More »

You are given a lock which is made up of n-different circular rings and each ring has 0-9 digit printed serially on it. Initially all… Read More »

We are given two numbers A and B such that B >= A. We need to compute the last digit of this resulting F such… Read More »

A cyclic number is an integer in which cyclic permutations of the digits are successive multiples of the number. The most widely known is the… Read More »

October 7, 2017

Given a number n, we need to find the sum of all the elements from all possible subsets of a set formed by first n… Read More »

Given an array of n integers. Find minimum x which is to be assigned to every array element such that product of all elements of… Read More »

October 6, 2017

Master theorem is a direct way to get the solution of a recurrence relation, provided that it is of the following type: T(n) = aT(n/b)… Read More »

An online algorithm is one that can process its input piece-by-piece in a serial fashion, i.e., in the order that the input is fed to… Read More »

Given a number N, our task is to generate all the possible cyclic permutations of the number. A cyclic permutation shifts all the elements of… Read More »

October 5, 2017

A series with same common difference is known as arithmetic series. The first term of series is a and common difference is d. The series… Read More »

Given an array of positive integers and many queries for divisibility. In every query, we are given an integer k ( > 0), we need… Read More »