## Ways to paint N paintings such that adjacent paintings don’t have same colors

Given two integers n and m, where n represent some paintings numbered from 1 to n and m represent some colours 1 to m with… Read More »

Given two integers n and m, where n represent some paintings numbered from 1 to n and m represent some colours 1 to m with… Read More »

Given three non-negative integers x, y and bound, the task is to print all the powerful integer ≤ bound in sorted order. A powerful integer… Read More »

Given two positive integers N and K. Find the minimum number of digits that can be removed from the number N such that after removals… Read More »

The power of a number says how many times to use the number in a multiplication. Powers are also called Exponents or Indices. For example,… Read More »

Given two numbers , find which is greater . If , print a^b is greater If , print b^a is greater If , print Both… Read More »

Given three integers a, b and x, the task is to get the multiple of x which is closest to ab. Examples: Input: a =… Read More »

Given an array arr[] of integer elements, the task is to find the total number of sub-sets of arr[] in which product of the elements… Read More »

Given two integers and , the task is to find the sum of all the numbers within the range [1, n] excluding the numbers which… Read More »

Given three numbers a, b, n. Find GCD(an, b). Examples: Input : a = 2, b = 3, n = 3 Output : 1 2^3… Read More »

Given four integers x, y, z and n, the task is to find the largest n digit number which is divisible by x, y and… Read More »

Given two integers and . The task is to find the maximum value of x, such that, n! % (k^x) = 0. Examples: Input :… Read More »

Given a positive integer N and K where and . The task is to check whether any permutation of digits of N equals any power… Read More »

Given number of digits ‘N’ and base ‘B’, the task is to count all the ‘N’ digit numbers without leading zeros that are in base… Read More »

Given an array of N elements. The task is to count unordered pairs (i, j) in the array such that the product of a[i] and… Read More »

Given a number N ( maybe up to 10^9 ). The task is to find the sum of first N natural number taking powers of… Read More »