Skip to content

Category Archives: Mathematical

Given a number ‘n’ and our goal is to find out it is palindrome or not without using any extra space. We can’t make a new… Read More
Given an array arr[]. The task is to find the maximum score that can be achieved from arr[] for i=[1, N-2]. The conditions for scoring… Read More
Given an array arr[] of N elements and an integer K. The task is to find the maximum sum of elements in a subarray of… Read More
Given an array of integers arr[] of size N, the task is to check whether arr[] can be split into different subarrays such that on… Read More
Given N ranges of the form [L, R], the task is to find the sum of all integers that lie in any of the given… Read More
Given an array arr[] of size n, The task is to find the GCD of the highest and lowest frequency element in the given array.… Read More
Given two integers P and Q, the task is to find any two integers whose Greatest Common Divisor(GCD) is P and the difference between their… Read More
Given an array arr of size N, and two integers A and B. The task is to find the length of the longest subsequence with… Read More
Given a large number N, the task is to find the factorial of N using recursion. Factorial of a non-negative integer is the multiplication of… Read More
Given an integer array arr[] of size n with only three types of integers 0’s, 1’s, and 2’s. Find the minimum length of the subarray… Read More
Given an Integer as N, the task is to convert N into two numbers a and b, such that a < b and GCD(a, b)… Read More
Given an array arr containing N positive integers, sort them according to the increasing modulus of their values with their frequencies. Example: Input: arr[]={1, 1,… Read More
Given a square matrix, the task is that we turn it by 180 degrees in an anti-clockwise direction without using any extra space.  Examples : … Read More
Given a square matrix, the task is that we turn it by 180 degrees in an anti-clockwise direction without using any extra space.  Examples : … Read More
Given a square matrix, the task is that turn it by 180 degrees in an anti-clockwise direction without using any extra space.  Examples :  Input:… Read More