Skip to content

Category Archives: Mathematical

Given a positive integer arr[] of length L (2 ≤ L ≤ 2000) containing elements from 1 to L in unsorted order and an integer… Read More
Given an array arr[] of size N, the task is to find the maximum number of sub-arrays such that the GCD(Greatest Common Factor) of all… Read More
Given an integer N, the task is to find the total number of distinct tuples(P, Q, R, S) formed by four integers with 1 ≤… Read More
Given an array arr[] of size N, the task is to minimize the number of distinct elements in the array after performing the following operation… Read More
Given an array arr[] of length N, denoting the cost of N items and the cashback upon buying that item, the task is to find… Read More
Given an array arr[] of length N, the task is to find the total number of elements that has frequency 1 in a subarray of… Read More
Given two force vectors, find out whether they are parallel, perpendicular or neither. Let the first vector be A = a1 i +a2 j +… Read More
Given an input arr[] of length N, Which contains integers from 1 to N in unsorted order. You can apply only one type of operation… Read More
Given an array A consisting of N positive integers and for any ordered triplet( i, j, k) such that i, j, and k are all… Read More
Given a set S of having numbers 1, 2, 3, . . ., N, and an integer K, the task is to form a set… Read More
Given an integer array arr[] of length N and an integer K, the task is to rearrange the elements of arr[] in such a way… Read More
Given an integer N(1 ≤ N ≤ 500), Construct an integer arr[] of length N, such that it should follow all the given conditions below: … Read More
Given an array A[] of length N, the task is to find the total number of distinct pairs (i, j) of indices where 1 ≤… Read More
Given an array A[] of size N such that every element is a positive power of 2. In one operation, choose a non-empty subsequence of… Read More
Given an array A[] and M, the task is to check whether there exist M non-overlapping subarrays(non-empty) of A for which the average of the… Read More

Start Your Coding Journey Now!