Skip to content

Category Archives: Mathematical

Given an integer N, denoting the size of a circle where first N integers are placed in clockwise order such that j and (j+1) are… Read More
Given a permutation arr[] of size N which is unsorted and contains all integers from 1 to N exactly once, the task is to find… Read More
Given two positive integers N and M, the task is to find the number of different GCDs which can be formed by adding an integer… Read More
Given an integer N, the task is to find the minimum and the maximum number of terms required to divide N as the sum of… Read More
Given an array arr[] of size N, the task is to check if for all distinct triplets of indices i, j, k, [  0 ≤… Read More
Given two integers N and M denoting a matrix of size N*M, the task is to form a matrix following the below criteria and make… Read More
Given three numbers n, r and p, the task is to compute the value of nCr % p. Note: p is a square-free number and… Read More
Given a variable X having an initial value 0 and an array of queries Q[] of size N containing the type of operations, the task… Read More
Given an array arr[] of size N, the task is to count the number of indices in arr[] such that after changing the element of… Read More
Given an array arr[] of length N, where arr is derived from an array nums[] which is lost. Array arr[] is derived as:  arr[i] =… Read More
Given three positive integers X, Y, and Z and an integer N, the task is to make them equal by adding 2i-1 for the ith… Read More
Given four numbers L, R, K, and X, the task is to find K distinct decimal numbers in the range [L, R] such that their… Read More
Given a very large number N, [1 ≤ length of digit of N (n) ≤ 106], the task is to find some positive integer of… Read More
Given two integers N and K and a range [L, R], the task is to build an array whose elements are unique and in the… Read More
Given a number N, the task is to check whether N has 7 divisors or not. Examples: Input: 64Output: 1 Explanation: 1, 2, 4, 8, 16,… Read More

Start Your Coding Journey Now!