# Category Archives: Mathematical

Given two integers L and R, the task is to find the value of (number of composites – number of primes) that lie in the… Read More
Given a 2D array arr[][] where each array element denotes a point in the X axis and the number of elements on that point. A… Read More
A relation is a subset of the cartesian product of a set with another set. A relation contains ordered pairs of elements of the set… Read More
There are N persons and N jobs. Given an array arr[] of size N*N where (arr[0], arr[1], . . ., arr[N-1]) denotes the time taken… Read More
Given an array arr[] of 1s and -1s, the task is to partition the array into maximum subarrays such that the sum of the alternating… Read More
Given a binary string str, the task is to find the maximum possible OR value of any two substrings of the binary string str. Examples:… Read More
Given an integer N, the task is to find a minimum possible Y that satisfies the following condition: Y > N. Y is not divisible… Read More
Given two arrays X[] and Y[] of length N each. You can make a pair by selecting exactly one element from X[] and Y[]. The… Read More
Given an array arr[] and a number K, the task is to find a value X such that maximum number of array elements can be… Read More
Given two strings S and T of length N, the task is to find the maximum points gained in converting the string S into string… Read More
Given the side (a, b, c) of a triangle and we have to find the perimeter of a triangle. Perimeter: Perimeter of a triangle is… Read More
Given the radius of a circle, find the area of that circle. The area of a circle can simply be evaluated using the following formula:… Read More
Given a positive integer n, write a function to find if it is a power of 2 or not Examples: Input: n = 4 Output:… Read More
What is ‘Compound interest’ ? Compound interest is the addition of interest to the principal sum of a loan or deposit, or in other words, interest… Read More
What is ‘Simple Interest’?Simple interest is a quick method of calculating the interest charge on a loan. Simple interest is determined by multiplying the daily… Read More