# Tag Archives: Numbers

## Find the number of good permutations

Given two integers N and K. The task is to find the number of good permutations of first N natural numbers. A permutation is called… Read More »

## Number of pairs from the first N natural numbers whose sum is divisible by K

Given the integer values of N and K. The task is to find the number of pairs from the set of natural numbers up to… Read More »

## Smallest and Largest N-digit perfect squares

Given an integer N, the task is to find the smallest and the largest N digit numbers which are also perfect squares. Examples: Input: N… Read More »

## Count of pairs from 1 to a and 1 to b whose sum is divisible by N

Given three integers a, b and N. Find the total number of distinct pairs which can be formed by selecting one integer from 1 to… Read More »

## Generate array with minimum sum which can be deleted in P steps

Given two numbers N and P. The task is to generate an array of all positive elements, and in one operation you can choose a… Read More »

## Last digit of Product of two Large or Small numbers (a * b)

Given two large or small numbers, the task is to find the last digit of the product of these two numbers. Examples: Input: a =… Read More »

## How to concatenate two Integer values into one?

Given two integers n1 and n2, the task is to concatenate these two integers into one integer. Example: Input: n1 = 12, n2 = 34… Read More »

## Check if frequency of characters are in Recaman Series

Given a string of lowercase alphabets. The task is to check whether the frequency of alphabets in this string, after arranging in any possible manner,… Read More »

## Count of all even numbers in the range [L, R] whose sum of digits is divisible by 3

Given two integers L and R. The task is to find the count of all even numbers in the range [L, R] whose sum of… Read More »

## Find a permutation of 2N numbers such that the result of given expression is exactly 2K

Given two integers N and K, the task is to find a permutation of first 2*N natural numbers such that the following equation is satisfied.… 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 »

## Smallest multiple of 3 which consists of three given non-zero digits

Given three non-zero digits 0 < A, B, C < 9. The task is to find the smallest number divisible by 3 all of whose… Read More »

## Natural Numbers

Counting numbers like 1, 2, 3, 4, 5, 6 … Basically, all integers greater than 0 are natural numbers. Fact about Natural numbers They are… Read More »

## Find the minimum positive integer such that it is divisible by A and sum of its digits is equal to B

Given two integers A and B, the task is to find the minimum positive integer N such that N is divisible by A and the… Read More »

## Find largest number smaller than N with same set of digits

Given a number N in the form of string. The task is to find the greatest number that has same set of digits as N… Read More »