Skip to content

Category Archives: Mathematical

Given a binary string S of size N, the task is to find the length of the longest non-increasing subsequence in the given string S.… Read More
Given a matrix mat][][] of size M x N which represents the topographic map of a region, and 0 denotes land and 1 denotes elevation,… Read More
Given string S consisting of lowercase and uppercase letters, the task is to find the number of substrings having the equal number of lowercase and… Read More
Given an array arr[] consisting of N integers, the task is to count the number of distinct pairs (arr[i], arr[j]) in the array such that… Read More
Given two N-digit positive integers X and Y, the task is to find the minimum absolute difference between both the integers possible by rearranging the… Read More
Given a positive integer N, the task is to print all the distinct even and odd values of prefix Bitwise XORs of first N natural… Read More
Given an array consisting of first N odd numbers, the task is to find the minimum number of operations required to make all the array… Read More
Given an N-sided polygon, the task is to find the ratio of the area of the Nth to (N + 1)th N-sided regular nested polygons… Read More
Given two arrays arr1[] and arr2[] consisting of N and M integers respectively, the task is to print the Bitwise XOR of Bitwise AND of… Read More
Given an array arr[] consisting of N integers, the task is to find the lexicographically largest permutation of the given array possible by exactly one… Read More
Given an integer K and an array A[] of size N, the task is to create a new array with sum K with minimum number… Read More
Given a 2D array plates[][] of size N, which each row representing the length and width of a N rectangular plates, the task is to… Read More
Given a positive integer N, the task is to count the number of integers from the range [1, N] having exactly 5 divisors. Examples: Input:… Read More
Given a string S consisting of N lowercase alphabets, the task is to check if it is possible to make all characters of the string… Read More
Given a Binary Search Tree (BST)consisting of N nodes and two nodes A and B, the task is to find the median of all the… Read More