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

# Tag Archives: math

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

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

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 Dy. A… Read More

Given three integers X, Y and N, the task is to find the Nth term of the series f[i] = f[i – 1] – f[i… Read More

Given three integers A, B and C, the task is to find the count of values of X such that the following condition is satisfied, X… Read More

Given an array A containing N elements (N is divisible by 3), the task is to split the numbers into groups of 3, let the… Read More

Given an array containing N elements, each element is either 1 or 2. The task is to find out whether the array can be divided… Read More

Given two numbers and . Find the values of X and Y in the equations. A = X + Y B = X xor Y The task… Read More

Given N points in 2 dimensional space. The task is to count the number of triplets pairs (A, B, C) such that point B is… Read More

Given two string A and B which represents two integers, the task is to print the maximized value of A after replacing 0 or more… Read More

Given two strings a and b, the task is to count the number of common divisors of both the strings. A string s is a… Read More

Given an integer N. The task is to find the maximum possible sum of intermediate values (Including N and 1) attained after applying the below… Read More

Given an array arr[] of n integers and an integer k. The task is to make all the elements of arr[] equal with the given… Read More

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