# Category Archives: Mathematical

## Minimum size Subarray with maximum sum in non-increasing order

Given an array arr, the task is to find a subarray of the array elements whose sum is strictly greater than the rest of the… Read More »

## Check if a subarray exists with sum greater than the given Array

Given an array of integers arr, the task is to check if there is a subarray (except the given array) such that the sum of… Read More »

## Find the count of mountains in a given Matrix

Given a 2D square matrix of size N X N, the task is to count the number of mountains in the matrix. An element in… Read More »

## Count of groups having largest size while grouping according to sum of its digits

Given an integer N, the task is to find the number of groups having the largest size. Each number from 1 to N is grouped… Read More »

## Find the real and imaginary part of a Complex number

Given a complex number Z, the task is to determine the real and imaginary part of this complex number. Examples: Input: z = 3 +… Read More »

## Find the conjugate of a Complex number

Given a complex number str in the form of a string, the task is to determine the conjugate of this complex number. Examples: Input: str… Read More »

## Probability of not getting two consecutive heads together in N tosses of coin

Given a fair coin which is tossed N times, the task is to determine the probability such that no two heads occur consecutively. Examples: Input:… Read More »

## Sum of GCD of all possible sequences

Given two numbers N and K. A sequence A1, A2, ….AN of length N can be created by placing numbers from 1 to K at… Read More »

## Area of circle inscribed in a Isosceles Trapezoid

Given two bases of the isoceles trapezoid ABCD as a and b, the task is to find the area of circle inscribed in this trapezoid… Read More »

## Finding Integreand using Weedle’s Rule

Given a function and two integers a and b. The task is to find the integrand of the given function from lower limit(a) to upper… Read More »

## Find the minimum number to be added to N to make it a prime number

Given an integer N, the task is to find the minimum number K to be added to N such that N + K becomes a… Read More »

## Find the position of the given Prime Number

Given a number N which is a prime number, the task is to find the position of the given prime number in the series of… Read More »

## Find the Number of Permutations that satisfy the given condition in an array

Given an array arr[] of size N, the task is to find the number of permutations in the array that follows the given condition: If… Read More »

## Print string after removing all (“10” or “01”) from the binary string

Given a binary string str consisting of only 0’s and 1’s, the task is to print the string after removing the occurrences of “10” and… Read More »

## Check if a path exists in a tree with K vertices present or are at most at a distance D

Given a tree with N vertices numbered [0, n – 1], K vertices and a distance D, the task is to find whether there is… Read More »