## 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 »

## Find the lexicographical next balanced bracket sequence

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 »

## Find the maximum length of the prefix

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 »

## Count the maximum number of elements that can be selected from the array

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 »

## Minimize the sum after choosing elements from the given three arrays

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 »

## Maximise array sum after taking non-overlapping sub-arrays of length K

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 »

## Count the number of digits of palindrome numbers in an array

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 »

## Sum of all palindrome numbers present in an Array

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 »

## Find maximum path sum in a 2D matrix when exactly two left moves are allowed

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 »

## Find the smallest positive number missing from an unsorted array : Hashing Implementation

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 »

## Factorial of an Array of integers

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 »

## Find the number of Chicks in a Zoo at Nth day

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 »

## Queries for the difference between the count of composite and prime numbers in a given range

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 »

## Count the nodes of the tree which make a pangram when concatenated with the sub-tree nodes

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 »

## Find whether an array is subset of another array using Map

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 »