# Tag Archives: math

## Generate an array of size K which satisfies the given conditions

Given two integers N and K, the task is to generate an array arr[] of length K such that: arr[0] + arr[1] + … +… Read More »

## Check if it is possible to create a polygon with given n sides

Given an array arr[] that contain the lengths of n sides that may or may not form a polygon. The task is to determine whether… Read More »

## Area of largest Circle inscribe in N-sided Regular polygon

Given a regular polygon of N sides with side length a. The task is to find the area of the Circle which inscribed in the… Read More »

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

Given the position of the king on an 8 X 8 chessboard, the task is to count the total number of squares that can be… Read More »

## Given count of digits 1, 2, 3, 4, find the maximum sum possible

Given the count of digits 1, 2, 3, 4. Using these digits you are allowed to only form numbers 234 and 12. The task is… Read More »

## Total distinct pairs of ugly numbers from two arrays

Given two arrays arr1[] and arr2[] of sizes N and M where 0 ≤ arr1[i], arr2[i] ≤ 1000 for all valid i, the task is… Read More »

## Minimum number of given operation required to convert n to m

Given two integers n and m, in a single operation n can be multiplied by either 2 or 3. The task is to convert n… Read More »

## Find amount of water wasted after filling the tank

Given the volume V of a tank in liter. There is a pump which is filling the tank at speed of M liter per minute.… Read More »

## Find if the given number is present in the infinite sequence or not

Given three integers A, B and C. In an infinite sequence, A is the first number, C is the common difference (Si – Si –… Read More »

## Check if matrix can be converted to another matrix by transposing square sub-matrices

Given two N X M matrices of integers. In an operation, we can transpose any square sub-matrix in matrix1. The task is to check if… Read More »

## Maximum average of a subarray of size of atleast X and atmost Y

Given an array arr[] and two integers X and Y. The task is to find a sub-array of size of atleast X and atmost Y… Read More »

## Series summation if T(n) is given and n is very large

Given a sequence whose nth term is T(n) = n2 – (n – 1)2 The task is to evaluate the sum of first n terms… Read More »

## Find the modified array after performing k operations of given type

Given an array arr[] of n integers and an integer K. In one operation every element of the array is replaced by the difference of… Read More »

## Find smallest number K such that K % p = 0 and q % K = 0

Given two integers p and q, the task is to find the smallest number K such that K % p = 0 and q %… Read More »

## Count possible moves in the given direction in a grid

Given a grid N x M size and initial position (X, Y) and a series of K moves. Each move contains 2 integers Dx and… Read More »