## Count of submatrix with sum X in a given Matrix

Given a matrix of size N x M and an integer X, the task is to find the number of sub-squares in the matrix with… Read More »

- Basic Algorithm Techniques Not Taught in Academics
- Check if sum of any subarray is Palindrome or not
- Length of Longest Subarray with same elements in atmost K increments
- Number of ways to obtain each numbers in range [1, b+c] by adding any two numbers in range [a, b] and [b, c]
- Range sum queries for anticlockwise rotations of Array by K indices
- Sum of product of proper divisors of all Numbers lying in range [L, R]
- Maximum product of sum of two contiguous subarrays of an array
- Minimum length subarray containing all unique elements after Q operations
- Maximum profit by selling N items at two markets
- Minimum Cost to make all array elements equal using given operations
- Find array elements equal to sum of any subarray of at least size 2
- Number of substrings with length divisible by the number of 1's in it
- Sum of all Perfect Squares lying in the range [L, R] for Q queries
- Maximum items that can be bought from the cost Array based on given conditions
- Number of ways of cutting a Matrix such that atleast one cell is filled in each part
- Find sum of all unique elements in the array for K queries
- Sum of all composite numbers lying in the range [L, R] for Q queries
- Count of elements which are power of 2 in a given range subarray for Q queries
- Queries to multiply the given subarray with given number X and print sum
- Find the maximum range [L,R] whose sum is divisible by M
- Maximum sum subarray of size range [L, R]
- Count of submatrix with sum X in a given Matrix
- Count of N-digit numbers with absolute difference of adjacent digits not exceeding K
- Longest subarray having sum K | Set 2

Given a matrix of size N x M and an integer X, the task is to find the number of sub-squares in the matrix with… Read More »

Given two integers N and K, the task is to find the count of N-digit numbers such that the absolute difference of adjacent digits in… Read More »

Given an integer array arr[] of size N and two integer L and R. The task is to find the maximum sum subarray of size… Read More »

Given an array arr[] consisting of N integers, the task is to find the start and end indices of the first subarray with a Negative… Read More »

Given an array arr[] of N positive integers and the number of queries Q, each query contains two numbers L and R. The task is… Read More »

Given a number X, the task is to find the minimum number N such that the sum of the count of all factors from 1… Read More »

Given a string str of lowercase alphabets, the task is to remove minimum characters from the given string so that string can be break into… Read More »

Given an array arr[] of size N, the task is to find the number of times the array can be partitioned repetitively into two subarrays… Read More »

Given an array arr[] of size N containing integers. The task is to find the length of the longest sub-array having sum equal to the… Read More »

Given an array arr[] of size N. the task is to check whether there exists any subarray of size atleast 2 such that its sum… Read More »

Given three integers a, b and c. You need to select one integer from the range [a, b] and one integer from the range [b,… Read More »

Given an integer K and a matrix mat[][] containing 1 and 0, where 1 denotes the cell is filled and 0 denotes an empty cell.… Read More »

Given an array arr[], the task is to find the elements from the array which are equal to the sum of any sub-array of size… Read More »

Given an array arr[] of positive integers and three integers A, R, M, where The cost of adding 1 to an element of the array… Read More »

Given an array arr[] consisting of N positive numbers and Q queries of the form [L, R], the task is to find the number of… Read More »