## Count numbers formed by given two digit with sum having given digits

Given a, b and N(1 to 106). Task is to count the numbers formed by digits a and b exactly of a length N such… Read More »

## Subarray with no pair sum divisible by K

Given an array of N non-negative integers, task is to find the maximum size of a subarray such that the pairwise sum of the elements… Read More »

## Equalizing array using increment under modulo 3

Given an array A containing N non-negative integers. Only following operation can be performed on the array: A[i] = ( A[i] + 1 ) %… Read More »

## Number of solutions to Modular Equations

Given A and B, the task is to find the number of possible values that X can take such that the given modular equation (A… Read More »

## Check if any valid sequence is divisible by M

Given an array of N integers, using ‘+’ and ‘-‘ between the elements check if there is a way to form a sequence of numbers… Read More »

## Find value of (n^1 + n^2 + n^3 + n^4) mod 5 for given n

You are given a function f(n) = (n1 + n2 + n3 + n4), you have to find the value of f(n) mod 5 for… Read More »

## Recursive sum of digits of a number formed by repeated appends

Given two positive number N and X. The task is to find the sum of digits of a number formed by N repeating X number… Read More »

## Find value of y mod (2 raised to power x)

Given two positive integer x and y. we have to find the value of y mod 2x. That is remainder when y is divided by… Read More »

## Modular multiplicative inverse from 1 to n

Give a positive integer n, find modular multiplicative inverse of all integer from 1 to n with respect to a big prime number, say, ‘prime’.… Read More »

## Maximum subarray sum in an array created after repeated concatenation

Given an array and a number k, find the largest sum of contiguous array in the modified array which is formed by repeating the given… Read More »

## Find last k digits in product of an array numbers

Given a array size of n, find the last k digits (1 <= k < 10) of product of array numbers Examples: Input : a[]… Read More »

## Find unit digit of x raised to power y

Given two numbers x and y, find unit digit of xy. Examples : Input : x = 2, y = 1 Output : 2 Explanation… Read More »

## Find reminder of array multiplication divided by n

Given multiple numbers and a number n, the task is to print the reminder after multiply all the number divide by n. Examples: Input :… Read More »

## Modulus of two float or double numbers

Given two floating point numbers, find remainder. Examples: Input : a = 36.5, b = 5.0 Output : 1.5 Input : a = 9.7, b… Read More »

## Given two numbers a and b find all x such that a % x = b

Given two numbers a and b find all x such that a % x = b . Examples: Input : a = 21, b =… Read More »