# Category Archives: Mathematical

Given an array arr[] of size N, the task is to find the number of pairs of the array upon removing which the mean (i.e.… Read More
Given two numeric strings S and Target, and integers X, M. The task is to check if string S can be converted into string Target… Read More
Given an array arr of length N and two integers K and X. For every element arri in the array, if arri > 0 then… Read More
Given an array arr of length N, the task is to find the minimum number of operations required to make all array elements 0, except… Read More
Given an array arr[] of N integers. Arrange the array in a way such that the minimum distance among all pairs of same elements is… Read More
Given an integer N, the task is to print a permutation of numbers from 0 to N-1, such that: There is no duplicate element in… Read More
Given an array height[] which represents the height of N people standing in a line. A person i can see a person j if height[j]… Read More
Given an array B, and two integers N, X (2 ≤ X ≤ 100). Initially, array arr has all its values as zero. The task… Read More
Given an array A[] of size N, find two Sub-sequences a and b, such that the sum of the average of two subsequences is maximized… Read More
Given a binary matrix of size NxN which is initially filled with 0’s and Q queries such that: Each query is of type (r, c)… Read More
Suffix Sum ArrayGiven an array arr[] of size N, the task is to compute and return its suffix sum array.  Suffix Sum is a precomputation… Read More
Given two numbers A and B, the task is to find the minimum number of operations required to reduce either A or B to 0,… Read More
Given integers N and K, the task is to generate an array of length N which contains exactly K subarrays as a permutation of 1… Read More
Over the network, messages are sent as data packets. Each data packet is a series of bytes (8bits = 1 byte). The task is to… Read More
Given N processes and two arrays, arr1[] and arr2[] of size N each. arr1[] contains time spent by any process in critical section and arr2[]… Read More