## Cost to make a string Panagram

Given an array arr[] containing the cost of adding each alphabet from (a – z) and a string str which may or may noyt be… Read More »

## Count Subarrays with Consecutive elements differing by 1

Given an array arr[] of N integers. The task is to count the total number of subarrays of the given array such that difference between… Read More »

## Maximize the difference between two subsets of a set with negatives

Given an of integers of size N. The task is to separate these integers into two groups g1 and g2 such that (sum of elements… Read More »

## Minimum score after flipping the cards

Given N cards having positive integers printed on the front and the back of each card (possibly different). Any number of cards can be flipped,… Read More »

## Largest palindromic number in an array

Given an array of non-negative integers arr[]. The task is to find the largest number in the array which is palindrome. If no such number… Read More »

## Remove all continuous occurrences of ‘a’ and all occurrences of ‘b’

Given a string str, the task is to remove all the continuous occurrences of a and all occurrences of b and print the resultant string.… Read More »

## Students with maximum average score of three subjects

Given a file containing data of student name and marks scored by him/her in 3 subjects. The task is to find the list of students… Read More »

## Find the only different element in an array

Given an array of integers where all elements are same except one element, find the only different element in the array. It may be assumed… Read More »

## Find the element whose multiplication with -1 makes array sum 0

Given an array of N integers. The task is to find the smallest index of an element such that when multiplied by -1 the sum… Read More »

## Check If every group of a’s is followed by a group of b’s of same length

Given a string str, the task is to check whether every group of consecutive a’s is followed by a group of consecutive b’s of same… Read More »

## Minimum range increment operations to Sort an array

Given an array containing N elements. It is allowed to do the below move any number of times on the array: Choose any L and… Read More »

## Find a range that covers all the elements of given N ranges

Given N ranges containing L and R. The task is to check or find the index(0-based) of the range which covers all the other given… Read More »

## Count pairs with Bitwise XOR as EVEN number

Given an array of N integers, the task is to find the number of pairs (i, j) such that A[i] ^ A[j] is even. Examples:… Read More »

## Find if there is any subset of size K with 0 sum in an array of -1 and +1

Given an integer K and an array arr containing only 1 and -1, the task is to find if there is any subset of size… Read More »

## Element equal to the sum of all the remaining elements

Given an array of N positive elements. The task is to find an element which is equal to the sum of all elements of array… Read More »