# Category Archives: Mathematical

Given two numeric string N and M, the task is to encode the given strings in the form “xAyB“, where: x is the count of… Read More
Given a positive integer, N. Find the sum of the first N term of the series- 1/1*3, 1/3*5, 1/5*7, …. Examples: Input: N = 3… Read More
Given a positive integer, N. Find the sum of the first N term of the series- 12, (12+22), (12+22+32),….,till N terms Examples: Input: N =… Read More
Given a positive integer, N. Find the sum of the first N term of the series- 1, (2+3), (4+5+6),….,till N terms Examples: Input: N =… Read More
Given an array arr[] of size N, the task is to find the maximum sum of means of 2 non-empty subsets of the given array… Read More
Given three integers L, R, and K. Consider an array arr[] consisting of all the elements from L to R, the task is to check… Read More
Given an array arr[] of size N and an integer K, the task is to find whether the sum of elements of the array is… Read More
Given a square matrix arr[][] of size N * N, the task is to check whether each row and column of a matrix contains all… Read More
Given an array nums[] of size N, the task is to check whether the given array can be converted into a permutation of 1 to… Read More
Given an array arr[] of size N, the task is to find the count of subarrays with elements in alternate increasing-decreasing order or vice-versa. A… Read More
Given an array arr[], consisting of N positive integers. The task is to minimize the difference between the maximum and the minimum element of the… Read More
Given a number N and an integer K, the task is to set the Kth bit of the number N, i.e., if the Kth bit… Read More
Given a positive integer N, the task is to find Nth term of the series- 3, 5, 9, 17, 33…till N terms Examples: Input: N… Read More
Given two numbers N and r, find the value of NCr using recursion Examples: Input: N = 5, r = 2Output: 10Explanation: The value of… Read More
Given an integer N, the task is to calculate the maximum number of times N can be divided by an integer K, where K is… Read More