## Count of elements such that difference between sum of left and right sub arrays is equal to a multiple of k

Given an array arr[] of length n and an integer k, the task is to find the number of indices from 2 to n-1 in… Read More »

- Kth smallest element in a subarray
- Introduction to Data Structures | 10 most commonly used Data Structures
- Find maximum xor of k elements in an array
- Find the smallest positive number missing from an unsorted array | Set 3
- Maximum sum combination from two arrays
- Remove duplicates from unsorted array using Set data structure
- Pair with largest sum which is less than K in the array
- Find the minimum number of moves to reach end of the array
- Sum of digits with even number of 1's in their binary representation
- Minimum number of Fibonacci jumps to reach end
- Calculate height of Binary Tree using Inorder and Level Order Traversal
- Reduce number to a single digit by subtracting adjacent digits repeatedly
- Find sum of a[i]%a[j] for all valid pairs
- Count smaller elements on right side and greater elements on left side using Binary Index Tree
- Find minimum changes required in an array for it to contain k distinct elements
- Maximum subsequence sum such that all elements are K distance apart
- Make the list non-decreasing by changing only one digit of the elements
- Queries for number of distinct elements in a subarray | Set 2
- Sort an array of strings according to string lengths using Map
- Count of triplets that satisfy the given equation
- Quadruplet pair with XOR zero in the given Array
- Number of Subsequences with Even and Odd Sum
- Find number of triplets in array such that a[i]>a[j]>a[k] and i<j<k
- Recursive program to find all Indices of a Number
- Find the sum of all possible pairs in an array of N elements
- Find the winner of the match | Multiple Queries
- Find subarray with given sum with negatives allowed in constant space
- Sum of the sums of all possible subsets
- Smallest element greater than X not present in the array
- Minimum Bitwise XOR operations to make any two array elements equal

Given an array arr[] of length n and an integer k, the task is to find the number of indices from 2 to n-1 in… Read More »

Given an array containing marks of students, the task is to calculate the percentile of the students. The percentile is calculated according to the following… Read More »

Given an M * N matrix, the task is to find the Frobenius Norm of the matrix. The Frobenius Norm of a matrix is defined… Read More »

Given an array of n non-consecutive integers and Q queries, the task is to check whether for the given range l and r, the elements… Read More »

Given an array of rectangular blocks with dimensions {l, b} of length m. we can shape each of rectangular blocks into a single square block… Read More »

Given an array arr[] consisting of even integers. At each move, you can select any even number X from the array and divide all the… Read More »

Given an array arr[] of length N, the task is to find the number of strictly increasing sub-sequences in the given array. Examples: Input: arr[]… Read More »

Given an array of integer arr[] and an integer k, the task is to find the median of each window of size k starting from… Read More »

Given a N x M matrix where N is the number of rows and M is the number of columns in the given matrix and… Read More »

Given an array arr, the task is to find the index of the element in an array which divides most elements before it Examples: Input:… Read More »

Given an array of length N, the task is to find minimum operation required to make all elements in the array equal. Operation is as… Read More »

Given the size of a binary array consisting of 0’s only as n and an integer m which is the number of flips allowed from… Read More »

Given an array arr of N elements, the task is to find the length of the smallest subarray of the given array that contains at… Read More »

Given a 2D array of size N containing distinct height of people standing in a queue, and a number corresponding to each person (P) that… Read More »

Given a sequence A1, A2, A3, … An of distinct integers. The task is to find the last 2 remaining elements after removing the median… Read More »