# Category Archives: Mathematical

Given an array A[] of length N, where N is an even number, the task is to answer Q independent queries where each query consists… Read More
Given an array of strings arr[] of size N and an encrypted string str, the task is to find the correct string from the given… Read More
Given three integers M, N and K, the task is to count all the possible paths from the cell (0, 0, 0) to cell (M-1,… Read More
Given an array arr[] containing N integers. In each operation, a minimum integer is chosen from the array and deleted from the array after subtracting… Read More
Given a string str of N characters, the task is to find the lexicographically smallest string that can be formed by concatenating any prefix and… Read More
Given array arr containing N integers. the task is to find the maximum number of unique elements in the array if each element in the… Read More
Given an array arr[]. The task is to minimize the number of removals to make all the elements in arr[] consecutive.  Examples Input: arr[] =… Read More
Given an array arr[] of size N where arr[i] is in the form [xi, yi] denoting a point (xi, yi) on a 2D plane. The… Read More
Given a number N, the task is to find the maximum number of steps convert N to zero where in each step a number m… Read More
Given integers N and K. The task is to construct an array of size N such that sum of all elements is divisible by K… Read More
Given two integers N and M (1 ≤ N, M ≤ 100) denoting the total number of 1s and 0s respectively. The task is to… Read More
Given two numbers N, M in the bases X, Y and another base P. The task is to find the product of N and M… Read More
Given an array arr[] of size N, and integer K. The task is to find the longest subarray with the difference between adjacent elements as… Read More
Given an array arr[] of N integers, the task is to find the length of the longest increasing subarray such that elements in the subarray… Read More
Given integers L and R, find all numbers in range L to R whose digits are increasing-decreasing alternatively i.e. if the digits in the current… Read More