# Category Archives: Mathematical

Given a binary string S of size N and an integer K, the task is to divide S into K disjoint subsequences(empty subsequences are also… Read More
Given an array A[] of size N where each element A[i] =max(P[0], P[1], . . ., P[i]), where P[] is a permutation consisting of elements… Read More
Given an array A[] of the length N. The task is to find the minimum sum of the array (i.e. A1 + A2 + …… Read More
Given a strictly increasing array A[] of size N, an integer K and Q queries of type [L, R], the task is to count the… Read More
Given an array of pairs arr[] of size N (N ≥ 3) where each element of pair is at most N and each pair is… Read More
Given positive integers N, A, B and C such that 1 ≤ C < N. The task is to maximize the value of B by… Read More
Why do we check up to the square root of a number to determine if that number is prime? Prime numbers are natural numbers greater… Read More
Given an integer N which denotes the number of elements in a binary heap. Check if the binary Heap is completely filled or not. Examples:… Read More
Given an array A[] of length N, choose any two elements x and y from the array, the task is to find the maximum value… Read More
Given an array arr[] of N integers, the task is to check whether it is possible to make all the array elements identical by applying… Read More
Given a number N, the task is to find the minimum number X such that A(X) = N, where A(X) for positive integer X is… Read More
Given an integer array A[] of length N (N >= 1), the task is to print the total number of indices in the array that… Read More
Given two integers L and R, where  L < R, the task is to find Co-prime numbers X and Y such that L <= X… Read More
Given two integers L and R, construct an array of given size N such that the GCD (Greatest Common Divisor) of the element with their… Read More
Given two even numbers A, and B, the task is to find the minimum number of operations required to make both numbers equal if it… Read More