## Split an array into groups of 3 such that X3 is divisible by X2 and X2 is divisible by X1

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 »

## Check if an array of 1s and 2s can be divided into 2 parts with equal sum

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 »

## Find the values of X and Y in the Given Equations

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

## Count triplet pairs (A, B, C) of points in 2-D space that satisfy the given condition

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 »

## Maximize the value of A by replacing some of its digits with digits of B

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 »

## Count the number of common divisors of the given strings

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 »

## Maximum sum after repeatedly dividing N by a divisor

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

## Make all elements of an array equal with the given operation

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 »

## 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 »

## Minimum spanning tree cost of given Graphs

Given an undirected graph of V nodes (V > 2) named V1, V2, V3, …, Vn. Two nodes Vi and Vj are connected to each… Read More »

## Check if array can be divided into two sub-arrays such that their absolute difference is K

Given an array arr[] and an integer K, the task is to find whether the array can be divided into two sub-arrays such that the… Read More »

## Find the repeating and the missing number using two equations

Given an array arr[] of size N, each integer from the range [1, N] appears exactly once except A which appears twice and B which… Read More »

## Sum of all even numbers in range L and R

Given two integers L and R, the task is to find the sum of all even numbers in range L and R. Examples: Input: L… Read More »