## Count of alphabets whose ASCII values can be formed with the digits of N

Given an integer N. You can select any two digits from this number (the digits can be same but their positions should be different) and… Read More »

## Puzzle | Neighbors in a round table

There are 6 persons seating on a round table in which two individual have the same names. What is the probability that the two same-named… Read More »

## Total position where king can reach on a chessboard in exactly M moves

Given an integer M, an 8 * 8 chessboard and the king is placed on one of the square of the chessboard. Let the coordinate… Read More »

## Find M-th number whose repeated sum of digits of a number is N

Given two positive integers N and M. The task is to find M-th number whose sum of digits of a number until sum becomes single… Read More »

## Check if a number can be represented as a sum of 2 triangular numbers

Given an integer N, the task is to find out whether it can be written as a sum of 2 triangular numbers (which may or… Read More »

## Maximize the value of x + y + z such that ax + by + cz = n

Given integers n, a, b and c, the task is to find the maximum value of x + y + z such that ax +… Read More »

## Absolute difference between the first X and last X Digits of N

Given two integers N and X. The task is to print the absolute difference between the first X and last X digits in N. Considering… Read More »

## Make all numbers of an array equal

Given an array arr[], the task is to make all the array elements equal with the given operation. In a single operation, any element of… Read More »

## Count of sub-sets of size n with total element sum divisible by 3

Given an integer n and a range [l, r], the task is to find the count of total sub-sets of size n with integers from… Read More »

## Generate minimum sum sequence of integers with even elements greater

Given an integer N, the task is to generate a sequence of N positive integers such that: Every element at the even position must be… Read More »

## Count Odd and Even numbers in a range from L to R

Given two numbers L and R, the task is to count the number of odd numbers in the range L to R. Examples: Input: l… Read More »

## Cost of painting n * m grid

Given two integers n and m which are the dimensions of a grid. The task is to find the cost of painting the grid cell… Read More »

## Minimum operations required to make all the array elements equal

Given an array arr[] of n integer and an integer k. The task is to count the minimum number of times the given operation is… Read More »

## Smallest integer greater than n such that it consists of digit m exactly k times

Given three integer n, m and k, the task is to find the smallest integer > n such that digit m appears exactly k times… Read More »

## Number of Simple Graph with N Vertices and M Edges

Given two integers N and M, the task is to count the number of simple undirected graphs that can be drawn with N vertices and… Read More »