## Number of ways to remove a sub-string from S such that all remaining characters are same

Given a string str consisting only of lowercase English alphabets, the task is to count the number of ways to remove exactly one sub-string from… Read More »

- Largest palindromic number in an array
- Count array elements that divide the sum of all other elements
- Maximum subarray sum in array formed by repeating the given array k times
- Longest subarray with elements having equal modulo K
- Array element with minimum sum of absolute differences
- Count pairs with Bitwise XOR as EVEN number
- Minimum elements to be removed such that sum of adjacent elements is always odd
- Smallest subarray such that all elements are greater than K
- Length of the longest substring with consecutive characters
- Maximum value of arr[i] % arr[j] for a given array
- Minimum number of given operations required to convert a string to another string
- Minimum number of elements to be removed so that pairwise consecutive elements are same
- Remove all continuous occurrences of 'a' and all occurrences of 'b'
- Replace every element with the greatest element on its left side
- Students with maximum average score of three subjects
- Maximize the difference between two subsets of a set with negatives
- Index with Minimum sum of prefix and suffix sums in an Array
- Minimum number of operations on an array to make all elements 0
- Element equal to the sum of all the remaining elements
- Count number of pairs (i, j) such that arr[i] * arr[j] > arr[i] + arr[j]
- Absolute Difference of even and odd indexed elements in an Array
- Minimum removals to make array sum odd
- Count Subarrays with Consecutive elements differing by 1
- Find the only different element in an array
- Replace every element with the smallest element on its left side
- Check if a binary string contains consecutive same or not
- Minimum replacements to make adjacent characters unequal in a ternary string
- Generate lexicographically smallest string of 0, 1 and 2 with adjacent swaps allowed
- Find the element whose multiplication with -1 makes array sum 0
- Check If every group of a's is followed by a group of b's of same length

Given a string str consisting only of lowercase English alphabets, the task is to count the number of ways to remove exactly one sub-string from… Read More »

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 »

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 »

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 »

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 »

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 »

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 »

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 »

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 »

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 »

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 »

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 »

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 »

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 »

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 »