## Sum of XOR of all sub-arrays of length K

Given an array of length n ( n > k), we have to find the sum of xor of all the elements of the sub-arrays… Read More »

- Kth smallest element in a subarray
- Find the smallest positive number missing from an unsorted array | Set 3
- 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
- Count smaller elements on right side and greater elements on left side using Binary Index Tree
- Find sum of a[i]%a[j] for all valid pairs
- 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
- Minimum number of Bottles visible when a bottle can be enclosed inside another Bottle
- Optimal Strategy for a Game | Set 3
- Subsequence X of length K such that gcd(X[0], X[1]) + (X[2], X[3]) + ... is maximized

Given an array of length n ( n > k), we have to find the sum of xor of all the elements of the sub-arrays… Read More »

Given a balanced bracket sequence as a string str containing character ‘(‘ or ‘)’, the task is to find the next lexicographical order balanced sequence… Read More »

Given an array arr[] of N integers where all elements of the array are from the range [0, 9] i.e. a single digit, the task… Read More »

Given an array arr[], the task is to count the maximum number of elements that can be selected from the given array following the below… Read More »

Given three arrays A[], B[] and C[] of same size N. The task is to minimize the sum after choosing N elements from these array… Read More »

Given an integer array arr[] of length N and an integer K, the task is to select some non-overlapping sub-arrays such that each sub-array is… Read More »

Given an array arr[] with N integers. The task is to count all the digits of all palindrome numbers present in the array. Examples: Input:… Read More »

Given an array arr[] of N positive integers. The task is to find the sum of all palindrome numbers present in the array. Print the… Read More »

Given a 2D matrix arr[][] of dimensions N * M where N is number of rows and M is number of columns.The task is to… Read More »

Given an unsorted array with both positive and negative elements including 0. The task is to find the smallest positive number missing from the array… Read More »

Given an array with positive integers. The task is to find the factorial of all the array elements. Note: As the numbers would be very… Read More »

Given that a zoo has a single chick. A chick gives birth to 2 chicks everyday and the life expectancy of a chick is 6… Read More »

Given Q queries where each query consists of two positive integers L and R and the task is to find the absolute difference between the… Read More »

Given a tree, and the weights (in the form of strings) of all the nodes, the task is to count the nodes whose weighted string… Read More »

Given two arrays: arr1[0..m-1] and arr2[0..n-1]. Find whether arr2[] is a subset of arr1[] or not. Both the arrays are not in sorted order. It… Read More »